11. The syntax of fgets is char *fgets(char *line, int maxline, FILE *fp). Which is true for fgets?
12. What does the following C code snippet mean?
char *gets(char *s)
char *gets(char *s)
13. Which functions is declared in ?
14. What does scanf() function return?
15. What will be the output of the following C code?
#include <stdio.h>
int main()
{
FILE *fp = stdout;
stderr = fp;
fprintf(stderr, "%s", "hello");
}
#include <stdio.h>
int main()
{
FILE *fp = stdout;
stderr = fp;
fprintf(stderr, "%s", "hello");
}
16. What is the use of symbol * in the control string as shown [=%[*][width] [modifiers] type=]?
17. Which of the following function can be used to terminate the main function from another function safely?
18. For a typical program, the input is taken using . . . . . . . .
19. What is the return value of putchar()?
20. What will be the output of the following C code?
#include <stdio.h>
int f(char chr, ...);
int main()
{
char c = 97;
f(c);
return 0;
}
int f(char c, ...)
{
printf("%c\n", c);
}
#include <stdio.h>
int f(char chr, ...);
int main()
{
char c = 97;
f(c);
return 0;
}
int f(char c, ...)
{
printf("%c\n", c);
}
Read More Section(File Input Output)
Each Section contains maximum 100 MCQs question on File Input Output. To get more questions visit other sections.