.TH EOF "" "" "Manifest Constant"
.II "end-of-file indicator"
.II "file, indicate end of"
.PC "Indicate end of a file"
.B "#include <stdio.h>"
.PP
.B EOF
is an indicator that is returned by several STDIO functions to
indicate that the current file position is the end of the file.
.if \nX=4 \{\
Its value is defined by the implementation, but a common value is \-1
on many systems, which is also a common error return.
.PP
The actual bytes used to delineate the end of a file may vary
between implementations. \}
.PP
Many STDIO functions, when they read
.BR EOF ,
set the end-of-file indicator
that is associated with the stream being read.
Before more data can be read from the stream, its end-of-file
indicator must be cleared.
Resetting the file-position indicator with
the functions
.BR fseek ,
.BR fsetpos ,
or
.B ftell
will clear the indicator, as will returning a character to the stream
with the function
.BR ungetc .
.SH "See Also"
.Xr "file," file
.Xr "manifest constant," manifestc
.Xr "stream," stream
.Xr "stdio.h" stdio.h
.br
\*(AS, \(sc7.9.1
