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 100easy
What is the output of the following C code if there is no error in stream fp?
#include <stdio.h>
int main()
{
FILE *fp;
fp = fopen("newfile", "w");
printf("%d\n", ferror(fp));
return 0;
}Question 101medium
What does the following C code snippet mean?
int ungetc(int c, FILE *stream)Question 102medium
Which is the best way to generate numbers between 0 to 99?
Advertisement
Question 103medium
Which of the following is an invalid method for input?
Question 104medium
What error will be generated on using incorrect specifier for the datatype being read?
Question 105easy
In C language, FILE is of which data type?
Advertisement
Question 106medium
Which types of input are accepted in toupper(c)?
Question 107medium
Which among the following is correct function call for rand() and random()?
Question 108easy
what is the return value of fputs()?