feof Function (Macro)

stdio.h

short feof (FILE *stream);

Tests a stream for an end-of-file indicator.

feof is a macro that tests the stream associated to the structure pointed to by stream for an end-of-file indicator. Once the indicator is set, read operations on the file return the indicator until fseek, fsetpos or rewind is called, or until the stream is closed. feof returns nonzero if an end-of-file indicator was detected on the last (usually input) operation on the given stream. It returns 0 if end-of-file has not been reached.


Used by: fgetc, fputc