--:--









Quiz for File operations fclose

Course: C Language | Subject: Unit 8 | Topic: File Handling



Logo

Q1: What is the purpose of the fclose() function?

Logo

Q2: What happens if fclose() is not called after fopen()?

Logo

Q3: What is the return type of fclose()?

Logo

Q4: What does fclose() return on successful file close?

Logo

Q5: What does fclose() return if an error occurs?

Logo

Q6: Is it safe to call fclose() on a NULL file pointer?

Logo

Q7: Can fclose() flush the buffer before closing a file?

Logo

Q8: Which header file declares fclose()?

Logo

Q9: What happens if fclose() fails?

Logo

Q10: Can fclose() be used to close files opened with fopen() in any mode?

Logo

Q11: Is fclose() a blocking call?

Logo

Q12: Why is it important to close files promptly?

Logo

Q13: Can multiple fclose() calls be made on the same FILE pointer?

Logo

Q14: How does fclose() handle errors during flushing?

Logo

Q15: Can fclose() close files opened with low-level system calls?

Logo

Q16: Which function should be called before fclose() to flush buffers?

Logo

Q17: What happens if program terminates without fclose()?

Logo

Q18: Is fclose() required to close stdin, stdout, stderr?

Logo

Q19: What is a common error when forgetting fclose()?

Are you ready to start test? Set your time limit