File Input Output - Study Mode

[#236] Which of the following is the right declaration for fgets() inside the library?
Correct Answer

(B) char *fgets(char *line, int maxline, FILE *fp)

[#237] What will be the output of the following C code? #include <stdio.h>
int main()
{
int i = 10, j = 3
printf("%d %d %d", i, j)
}
Correct Answer

(C) 10 3 some garbage value
(G) 10 3 some garbage value

[#238] What will be the output of the following C code? #include <stdio.h>
int main()
{
char *n
scanf("%s", n)
return 0
}
Correct Answer

(B) Undefined behavior

[#239] Which of the following fopen() statements are illegal?
Correct Answer

(D) none of the mentioned

[#240] The syntax of printf() function is printf("control string", variable list)
what is the prototype of the control string?
Correct Answer

(C) %[flags][width][.precision][length]specifier