C Programming - MCQ Practice Questions
Practice free C Programming multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.
978 questions | 100% Free
Which function is used to open a file in C?
What does the mode 'rb' mean in fopen()?
Which function is used to close a file in C?
Which mode opens a file for writing and truncates it if it exists?
When opening a file in 'w' mode, what happens if the file already exists?
Which of the following file modes in fopen() allows reading only?
In file handling, what does the 'b' flag in file modes like 'rb' or 'wb' indicate?
Which function is used to determine the current position in a file?
What is the correct syntax to open a file named 'data.txt' in read mode?
Which mode allows both reading and writing to a file, creating it if it doesn't exist?
What does the fclose() function do?
Which function writes formatted output to a file?
What will fseek(fp, 0, SEEK_END) do?
Which function reads formatted data from a file?
What is returned by fopen() if file opening fails?
What does the third parameter of fseek() represent?
Which header file must be included to use file handling functions in C?
What does the 'w+' mode do when opening a file with fopen()?
Which function is used to write a single character to a file?
What is the return value of feof(fp) when the end of file is reached?