prog.c:1:1: error: invalid suffix "What" on floating constant
1.What is the output of the following code?
^
prog.c:1:1: error: expected identifier or '(' before numeric constant
In file included from /usr/include/stdio.h:74:0,
from prog.c:3:
/usr/include/libio.h:306:3: error: unknown type name 'size_t'
size_t __pad5;
^
/usr/include/libio.h:310:67: error: 'size_t' undeclared here (not in a function)
char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
^
/usr/include/libio.h:338:62: error: expected declaration specifiers or '...' before 'size_t'
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
^
/usr/include/libio.h:347:6: error: expected declaration specifiers or '...' before 'size_t'
size_t __n);
^
/usr/include/libio.h:469:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_IO_sgetn'
extern _IO_size_t _IO_sgetn (_IO_FILE *, void *, _IO_size_t);
^
In file included from prog.c:3:0:
/usr/include/stdio.h:337:20: error: expected declaration specifiers or '...' before 'size_t'
int __modes, size_t __n) __THROW;
^
/usr/include/stdio.h:386:44: error: expected declaration specifiers or '...' before 'size_t'
extern int snprintf (char *__restrict __s, size_t __maxlen,
^
/usr/include/stdio.h:390:45: error: expected declaration specifiers or '...' before 'size_t'
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
^
/usr/include/stdio.h:709:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fread'
extern size_t fread (void *__restrict __ptr, size_t __size,
^
/usr/include/stdio.h:715:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fwrite'
extern size_t fwrite (const void *__restrict __ptr, size_t __size,
^
prog.c:5:1: warning: return type defaults to 'int' [-Wimplicit-int]
main()
^
prog.c: In function 'main':
prog.c:17:2: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
r=p;
^
prog.c:19:8: warning: format '%d' expects argument of type 'int', but argument 2 has type 'int *' [-Wformat=]
printf("%d",*r);
^
prog.c: At top level:
prog.c:23:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
i.100
^
prog.c:64:1: error: unknown type name 'Select'
Select one:
^
prog.c:64:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:78:1: error: invalid suffix "Which" on floating constant
1.Which of the following will be the correct output for the program given below?
^
prog.c:94:8: warning: missing terminating " character
printf("%d%d\n”,*p,*q);
^
prog.c:94:1: error: missing terminating " character
printf("%d%d\n”,*p,*q);
^
prog.c:98:1: error: unknown type name 'Select'
Select one:
^
prog.c:98:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:112:1: error: invalid suffix "Which" on floating constant
1.Which of the following statements are correct about the C program given below?
^
prog.c:122:7: warning: missing terminating " character
scanf("%d”, &size);
^
prog.c:122:1: error: missing terminating " character
scanf("%d”, &size);
^
prog.c:130:7: warning: missing terminating " character
scanf("%d”,arr[i]);
^
prog.c:130:1: error: missing terminating " character
scanf("%d”,arr[i]);
^
prog.c:132:8: warning: missing terminating " character
printf("%d\n”,arr[i]);
^
prog.c:132:1: error: missing terminating " character
printf("%d\n”,arr[i]);
^
prog.c:140:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
a.The code is erroneous since the subscript for array used in for loop is in the range 1 to size.
^
prog.c:146:76: error: unknown type name 'is'
d.The code is erroneous since the type declaration statementint arr[size]; is done after scanf().
^
prog.c:146:84: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'after'
d.The code is erroneous since the type declaration statementint arr[size]; is done after scanf().
^
prog.c:146:84: error: unknown type name 'after'
prog.c:161:1: error: invalid suffix "What" on floating constant
1.What is the output of the following code?
^
prog.c:176:1: error: unknown type name 'Select'
Select one:
^
prog.c:176:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:201:1: error: unknown type name 'Select'
Select one:
^
prog.c:201:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:215:1: error: invalid suffix "What" on floating constant
1.What is the output of the following code?
^
prog.c:230:1: error: unknown type name 'Select'
Select one:
^
prog.c:230:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:256:1: error: unknown type name 'Select'
Select one:
^
prog.c:256:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
In file included from prog.c:274:0:
/usr/include/string.h:50:56: error: expected declaration specifiers or '...' before 'size_t'
extern void *memmove (void *__dest, const void *__src, size_t __n)
^
/usr/include/string.h:66:42: error: expected declaration specifiers or '...' before 'size_t'
extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
^
/usr/include/string.h:69:56: error: expected declaration specifiers or '...' before 'size_t'
extern int memcmp (const void *__s1, const void *__s2, size_t __n)
^
/usr/include/string.h:96:48: error: expected declaration specifiers or '...' before 'size_t'
extern void *memchr (const void *__s, int __c, size_t __n)
^
/usr/include/string.h:133:39: error: expected declaration specifiers or '...' before 'size_t'
const char *__restrict __src, size_t __n)
^
/usr/include/string.h:141:9: error: expected declaration specifiers or '...' before 'size_t'
size_t __n) __THROW __nonnull ((1, 2));
^
/usr/include/string.h:147:57: error: expected declaration specifiers or '...' before 'size_t'
extern int strncmp (const char *__s1, const char *__s2, size_t __n)
^
/usr/include/string.h:154:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strxfrm'
extern size_t strxfrm (char *__restrict __dest,
^
/usr/include/string.h:285:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strcspn'
extern size_t strcspn (const char *__s, const char *__reject)
^
/usr/include/string.h:289:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strspn'
extern size_t strspn (const char *__s, const char *__accept)
^
/usr/include/string.h:399:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strlen'
extern size_t strlen (const char *__s)
^
/usr/include/string.h:451:33: error: expected declaration specifiers or '...' before 'size_t'
extern void __bzero (void *__s, size_t __n) __THROW __nonnull ((1));
^
In file included from /usr/include/string.h:635:0,
from prog.c:274:
/usr/include/i386-linux-gnu/bits/string2.h:945:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c1'
__STRING_INLINE size_t __strcspn_c1 (const char *__s, int __reject);
^
/usr/include/i386-linux-gnu/bits/string2.h:947:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c1'
__strcspn_c1 (const char *__s, int __reject)
^
/usr/include/i386-linux-gnu/bits/string2.h:955:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c2'
__STRING_INLINE size_t __strcspn_c2 (const char *__s, int __reject1,
^
/usr/include/i386-linux-gnu/bits/string2.h:958:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c2'
__strcspn_c2 (const char *__s, int __reject1, int __reject2)
^
/usr/include/i386-linux-gnu/bits/string2.h:967:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c3'
__STRING_INLINE size_t __strcspn_c3 (const char *__s, int __reject1,
^
/usr/include/i386-linux-gnu/bits/string2.h:970:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c3'
__strcspn_c3 (const char *__s, int __reject1, int __reject2,
^
/usr/include/i386-linux-gnu/bits/string2.h:1021:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strspn_c1'
__STRING_INLINE size_t __strspn_c1 (const char *__s, int __accept);
^
/usr/include/i386-linux-gnu/bits/string2.h:1023:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strspn_c1'
__strspn_c1 (const char *__s, int __accept)
^
/usr/include/i386-linux-gnu/bits/string2.h:1032:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strspn_c2'
__STRING_INLINE size_t __strspn_c2 (const char *__s, int __accept1,
^
/usr/include/i386-linux-gnu/bits/string2.h:1035:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strspn_c2'
__strspn_c2 (const char *__s, int __accept1, int __accept2)
^
/usr/include/i386-linux-gnu/bits/string2.h:1044:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strspn_c3'
__STRING_INLINE size_t __strspn_c3 (const char *__s, int __accept1,
^
/usr/include/i386-linux-gnu/bits/string2.h:1047:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strspn_c3'
__strspn_c3 (const char *__s, int __accept1, int __accept2, int __accept3)
^
/usr/include/i386-linux-gnu/bits/string2.h: In function '__strpbrk_c2':
/usr/include/i386-linux-gnu/bits/string2.h:1105:50: error: expected ';' before '__s'
return *__s == '\0' ? NULL : (char *) (size_t) __s;
^
/usr/include/i386-linux-gnu/bits/string2.h: In function '__strpbrk_c3':
/usr/include/i386-linux-gnu/bits/string2.h:1117:50: error: expected ';' before '__s'
return *__s == '\0' ? NULL : (char *) (size_t) __s;
^
prog.c: At top level:
prog.c:276:6: warning: return type of 'main' is not 'int' [-Wmain]
void main(){
^
prog.c:276:6: error: conflicting types for 'main'
prog.c:5:1: note: previous definition of 'main' was here
main()
^
prog.c:285:1: error: unknown type name 'Select'
Select one:
^
prog.c:285:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:312:1: error: unknown type name 'Select'
Select one:
^
prog.c:312:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:325:1: error: invalid suffix "What" on floating constant
1.What is the output of the following code?
^
prog.c:340:1: error: unknown type name 'Select'
Select one:
^
prog.c:340:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:354:1: error: invalid suffix "Which" on floating constant
1.Which of the following statements is correct about the program given below?
^
prog.c:364:8: warning: missing terminating " character
printf("%d\n”,*(*(*(arr))));
^
prog.c:364:1: error: missing terminating " character
printf("%d\n”,*(*(*(arr))));
^
prog.c:368:1: error: unknown type name 'Select'
Select one:
^
prog.c:368:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:369:29: warning: character constant too long for its type
a. It will report an error: 'Invalid Indirection ' Correct
^
prog.c:375:49: warning: character constant too long for its type
The correct answer is: It will report an error: 'Invalid Indirection '
^
prog.c:393:1: error: unknown type name 'Select'
Select one:
^
prog.c:393:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:407:3: error: stray '#' in program
1.#include<stdio.h>
^
prog.c:419:1: warning: return type defaults to 'int' [-Wimplicit-int]
main()
^
prog.c:419:1: error: redefinition of 'main'
prog.c:5:1: note: previous definition of 'main' was here
main()
^
prog.c: In function 'main':
prog.c:427:14: warning: implicit declaration of function 'fn1' [-Wimplicit-function-declaration]
printf("%d ",fn1());
^
prog.c: At top level:
prog.c:431:1: error: unknown type name 'What'
What does the above program print?
^
prog.c:431:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'the'
What does the above program print?
^
prog.c:431:11: error: unknown type name 'the'
prog.c:451:23: warning: multi-character character constant [-Wmultichar]
The correct answer is 'True'.
^
prog.c:458:1: error: invalid suffix "What" on floating constant
1.What will be output if you will execute following c code?
^
prog.c:474:1: error: unknown type name 'Select'
Select one:
^
prog.c:474:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:499:1: error: unknown type name 'Select'
Select one:
^
prog.c:499:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:529:1: error: invalid suffix "What" on floating constant
1.What is the output of the following code?
^
prog.c:558:1: error: unknown type name 'Select'
Select one:
^
prog.c:558:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:582:1: error: unknown type name 'Select'
Select one:
^
prog.c:582:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Select one:
^
prog.c:584:4: error: invalid suffix "Hello" on integer constant
b. 10Hello world
^
prog.c:586:4: error: invalid suffix "Hello" on integer constant
d. 11Hello world
^