When reading a file in C, which function can be used to check if the end of the file has been reached?
- endOfFile()
- feof()
- fileEOF()
- file_end()
The correct function is feof(), which stands for "file end of file." It returns a non-zero value if the end of the file has been reached, indicating that there are no more characters to read.
Loading...
Related Quiz
- What is the time complexity of the linear search algorithm in the worst case?
- How does C++ resolve calls to overloaded functions?
- What is the effect of not specifying the size of the array when initializing it with a list of values?
- In C, a string is essentially an array of ________ terminated by a null character.
- What is the term used to describe the number of indices needed to select an element in a multidimensional array?