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 199medium
rand() and srand() functions are used . . . . . . . .
Question 200easy
. . . . . . . . is used to define the type and the interpretation of the value of the corresponding argument.
Question 201hard
What will be the output of the following C code?
#include <stdio.h>
int main()
{
FILE *fp = stdin;
int n;
fprintf(fp, "%d", 45);
}Advertisement
Question 202hard
What will be the output of the following C code?
#include <stdio.h>
#include <string.h>
int main()
{
char *str = "hello, world";
char *str1 = "hello, world";
if (strcmp(str, str1))
printf("equal");
else
printf("unequal");
}Question 203easy
What is the function of FILE *tmpfile(void)?
Question 204easy
What happens when zero flag is used with left justification?
Advertisement
Question 205medium
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int n;
scanf("%d", n);
printf("%d\n", n);
return 0;
}Question 206medium
Which of the following is not a valid mathematical function?
Question 207easy
EOF is an integer type defined in stdio. hand has a value . . . . . . . .