aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C Programming Fundamentals and Standard Specification
  • FILE *f = fopen( fileName, "r" ); readData( f ); if( ????...
Multiple choice

FILE *f = fopen( fileName, "r" ); readData( f ); if( ???? ) { puts( "End of file was reached" ); }

Which one of the following can replace the ???? in the code above to determine if the end of a file has been reached?

  1. f == EOF

  2. feof( f )

  3. eof( f )

  4. f == NULL

  5. !f

Reveal answer Fill a bubble to check yourself
A Correct answer

Keep practicing — related questions

  • _________________ function is used to check the end of file condition.
  • Which command is used to display the end of a file?
  • Which of the following Standard C functions can be used to reset end-of-file and error conditions on an ope...
  • Which of the following file modes opens the file in such a way that all the new data is added to the end of...
  • What is the use of function feof ( ) in C language?
  • Which of the following file control functions returns the current position of the file pointer on success a...
  • With which of the following formatted functions is the EOF() end of file function used?
  • Which of the following mode of fopen() function opens a file only for writing. If a file with that name doe...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy