This indicator is generally set by a previous operation on the stream that reached the End-of-File.
Further operations on the stream once the End-of-File has been reached will fail until either rewind, fseek or fsetpos is successfully called to set the position indicator to a new value.
Parameters
- stream
- Pointer to a FILE object that identifies the stream.
Return Value
A non-zero value is returned in the case that the End-of-File indicator associated with the stream is set.Otherwise, a zero value is returned.
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
This code opens the file called myfile.txt, and counts the number of characters that it contains by reading all of them one by one. Finaly the total amount of bytes is printed out.
See also
| clearerr | Clear error indicators (function) |
| ferror | Check error indicator (function) |
