getc
get character from stream
- Provided by: manpages-dev (Version: 6.17-1)
- Source: manpages
- Report a bug
get character from stream
Standard C library (libc, -lc)
#include <stdio.h>
int getc(FILE *stream);
getc() is equivalent to fgetc(3), except for the BUGS (see below).
Use fgetc(3) instead.
C23, POSIX.1-2024.
POSIX.1-2001, C89.
It may be implemented as a macro, and it may evaluate stream more than once.
The name is inconsistent. It is often confused with getchar(3), as normally <stdio.h> functions without the "f" prefix in their name are variants that use stdin.