File Input Output MCQs

296 questionsC-ProgramPage 4 of 33

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 28easy
What is the return value of 'putc' if it fails to write a character to a file in C?
Question 29easy
Which function is used to read and write data in binary mode in C?
Question 30easy
What is the purpose of the 'fileno' function in C?
Advertisement
Question 31easy
The given statement FILE *fptr;
Question 32easy
The function fprintf is used in the program ...........
Question 33easy
What are the two predefined FILE pointers in C?
Advertisement
Question 34medium
Which one of the following is valid for opening a read-only ASCII file?
Question 35medium
Choose the correct difference between getc() and fgetc().
Question 36medium
. . . . . . . . is an optional argument that gives the maximum number of characters to be read.