1EOF(3const)                                                        EOF(3const)
2
3
4

NAME

6       EOF - end of file or error indicator
7

LIBRARY

9       Standard C library (libc)
10

SYNOPSIS

12       #include <stdio.h>
13
14       #define EOF  /* ... */
15

DESCRIPTION

17       EOF represents the end of an input file, or an error indication.  It is
18       a negative value, of type int.
19
20       EOF is not a character (it can't be represented by unsigned char).   It
21       is  instead a sentinel value outside of the valid range for valid char‐
22       acters.
23

CONFORMING TO

25       C99 and later; POSIX.1-2001 and later.
26

CAVEATS

28       Programs can't pass this value to an output function to "write" the end
29       of  a  file.  That would likely result in undefined behavior.  Instead,
30       closing the writing stream or file descriptor that refers to such  file
31       is the way to signal the end of that file.
32

SEE ALSO

34       feof(3), fgetc(3)
35
36
37
38Linux man-pages 6.05              2023-02-05                       EOF(3const)
Impressum