File Input Output MCQs
Practice free File Input Output multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 296 questions — no login required.
Question 244hard
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);
}Question 245medium
What will be the output of the following C function when EOF returns?
int fputs(char *line, FILE *fp)Question 246medium
A conversion specification %7.4f means . . . . . . . .
Advertisement
Question 247easy
puts() function adds newline character.
Question 248medium
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.
Question 249easy
What does tmpfile() returns when it could not create the file?
Advertisement
Question 250hard
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;
}Question 251hard
What will be the output of the following C code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("%d\n", rand() % 1000);
return 0;
}Question 252medium
If the mode includes b after the initial letter, what does it indicates?