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.
Loading...
Related Quiz
- What is the primary cause of memory leaks in a C program?
- What is the lifetime of a static variable in a C program?
- In C, the first element of an array can be accessed using index ________.
- A ________ variable in C is a variable that is declared within a function or a block and is only accessible within that function or block.
- How does the 'return' statement affect the flow of control within a loop?