FEOF - check for end-of-file.

(ANSI Standard)


#include <stdio.h>
i = feof(f);


FILE *f;
points to the file that is to be checked.
int i;
is non-zero if end of file has been reached, and zero otherwise.


"feof" checks for end of file on the indicated file. It is implemented as a macro.

When the data is being read from a terminal, the terminal user can generate an end of file condition by entering a line consisting of CTRL-\ (hold down the CTRL key and press the backslash), followed immediately by a carriage return. This is the ASCII file separator (FS) character. (Note that this is different from UNIX which uses the CTRL-D (EOT) character to signify end-of-file.)

Copyright © 1996, Thinkage Ltd.