71. What will be the output of the following C code?
#include <stdio.h>
int main()
{
short int i;
scanf("%hd", &i);
printf("%hd", i);
return 0;
}
#include <stdio.h>
int main()
{
short int i;
scanf("%hd", &i);
printf("%hd", i);
return 0;
}
72. fflush(NULL) flushes all . . . . . . . .
73. What will be the output of the following C code?
#include <stdio.h>
int main()
{
FILE *fp = stdout;
int n;
fprintf(fp, "%d\n ", 45);
fprintf(stderr, "%d ", 65);
return 0;
}
#include <stdio.h>
int main()
{
FILE *fp = stdout;
int n;
fprintf(fp, "%d\n ", 45);
fprintf(stderr, "%d ", 65);
return 0;
}
74. What will fopen will return, if there is any error while opening a file?
75. Which of the following is the right declaration for fgets() inside the library?
76. 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);
}
#include <stdio.h>
int main()
{
int i = 10, j = 3;
printf("%d %d %d", i, j);
}
77. What will be the output of the following C code?
#include <stdio.h>
int main()
{
char *n;
scanf("%s", n);
return 0;
}
#include <stdio.h>
int main()
{
char *n;
scanf("%s", n);
return 0;
}
78. Which of the following fopen() statements are illegal?
79. The syntax of printf() function is printf("control string", variable list) ;what is the prototype of the control string?
80. What will be the output of the following C code?
#include <stdio.h>
int main()
{
short int i;
scanf("%*hd", &i);
printf("%hd", i);
return 0;
}
#include <stdio.h>
int main()
{
short int i;
scanf("%*hd", &i);
printf("%hd", i);
return 0;
}
Read More Section(File Input Output)
Each Section contains maximum 100 MCQs question on File Input Output. To get more questions visit other sections.