Standard C++ Library Reference ISO/IEC (VERSION3)

stream argument to a library function.
Stream States
The valid states, and state transitions, for a stream are shown in the diagram.
Each of the circles denotes a stable state. Each of the lines denotes a transition that can occur as
the result of a function call that operates on the stream. Five groups of functions can cause state
transitions.
Functions in the first three groups are declared in <stdio.h>:
the byte read functions -- fgetc, fgets, fread, fscanf, getc, getchar, gets,
scanf, and ungetc
the byte write functions -- fprintf, fputc, fputs, fwrite, printf, putc,
putchar, puts, vfprintf, and vprintf
the position functions -- fflush, fseek, fsetpos, and rewind
Functions in the remaining two groups are declared in <wchar.h>:
the wide read functions -- fgetwc, fgetws, fwscanf, getwc, getwchar,
ungetwc, and wscanf
the wide write functions -- fwprintf, fputwc, fputws, putwc, putwchar,