41. What is the prototype of scanf function?
42. What will be the output of the following C code?
#include <stdio.h>
#include <math.h>
int main()
{
int i = 90;
printf("%f\n", sin(i));
return 0;
}
#include <stdio.h>
#include <math.h>
int main()
{
int i = 90;
printf("%f\n", sin(i));
return 0;
}
43. Which type of files can't be opened using fopen()?
44. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 10, j = 3, k = 3;
printf("%d %d ", i, j, k);
}
#include <stdio.h>
int main()
{
int i = 10, j = 3, k = 3;
printf("%d %d ", i, j, k);
}
45. What will be the output of the following C function when EOF returns?
int fputs(char *line, FILE *fp)
int fputs(char *line, FILE *fp)
46. A conversion specification %7.4f means . . . . . . . .
47. puts() function adds newline character.
48. The . . . . . . . . function reads atmost one less than the number of characters specified by size from the given stream and it is stored in the string str.
49. What does tmpfile() returns when it could not create the file?
50. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int n;
scanf("%d", &n);
ungetc(n, stdin);
scanf("%d", &n);
printf("%d\n", n);
return 0;
}
#include <stdio.h>
int main()
{
int n;
scanf("%d", &n);
ungetc(n, stdin);
scanf("%d", &n);
printf("%d\n", n);
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.