.TH feof() "" "" "STDIO Function (libc)"
.PC "Discover stream status"
.B "#include <stdio.h>"
\fBint feof(\fIfp\^\fB) FILE *\fIfp\^\fB;\fR
.PP
.B feof()
tests the status of the argument stream
.IR fp .
It returns a number other than zero if
.I fp
has reached the end of file, and zero if it has not.
One use of
.B feof()
is to distinguish a value of \-1 returned by
.B getw()
from an
.BR EOF .
.SH Example
For an example of how to use this function, see the
entry for
.BR fopen() .
.SH "See Also"
.Xr "EOF," eof
.Xr "libc" libc
.br
\*(AS, \(sc7.9.10.2
.br
\*(PX Standard, \(sc8.1
