🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Files and Preprocessor: all 10 questions

Quiz: Files and Preprocessor · Question 1 of 10

What does fopen return if the file can't be opened?

What does fopen return if the file can't be opened?

  1. A.0
  2. B.-1
  3. C.NULL
  4. D.An empty file
Answer & explanation

Correct answer: NULL

Always compare the result with NULL before using it.

Can you get the rest right without peeking?

Take the timed Quiz: Files and Preprocessor quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →