What is the purpose of the feof function in file handling in C?

  • It checks if the file pointer is at the beginning.
  • It checks if the end-of-file indicator is set.
  • It returns the size of the file.
  • It verifies if the file is open for editing.
The correct option is It checks if the end-of-file indicator is set. The feof function is used to determine if the end-of-file indicator has been set for a stream, helping to identify whether the end of the file has been reached during file operations in C.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *