December 2005
Beginner to intermediate
618 pages
20h 19m
English
feof
Tests whether the file position is at the end
#include <stdio.h> intfeof( FILE *fp);
The feof() macro tests
whether the file position indicator of a given file is at the end of
the file.
The feof() macro’s argument
is a FILE pointer. One attribute
of the file or stream referenced by this pointer is the end-of-file
flag, which indicates that the program has attempted to read past
the end of the file. The feof()
macro tests the end-of-file flag and returns a nonzero value if the
flag is set. If not, feof()
returns 0.
See the examples at clearerr() and fclose() in this
chapter.
Read now
Unlock full access