Standard I/O Library: stdio.h

The ANSI C standard library includes several standard I/O functions associated with streams and the stdio.h file. Table RS.V.30 presents the ANSI prototypes for these functions along with a brief explanation of what they do. (Many are described more fully in Chapter 13, “File Input/Output.”) The header file also defines the FILE type, the values EOF and NULL, and the standard I/O streams stdin, stdout, and stderr, along with several constants used by the functions in this library.

Table RS.V.30. ANSI C Standard I/O Functions
Prototype Description
void clearerr(FILE *); Clears end-of-file and error indicators.
int fclose(FILE *); Closes the indicated file.
int feof(FILE *); Tests for end of file.
int ferror(FILE *); ...

Get C Primer Plus, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.