fgetc(3) Library Functions Manual fgetc(3) fgetc, fgets, getchar, ungetc - (libc -lc) #include int fgetc(FILE *stream); int getchar(void); char *fgets(int size; char s[restrict size], int size, FILE *restrict stream); int ungetc(int c, FILE *stream); fgetc() stream unsigned char int EOF . getchar() fgetc(stdin). fgets() size stream s. EOF . . ('\0') . ungetc() c stream unsigned char . . stdio . unlocked_stdio(3). fgetc() getchar() unsigned char int EOF . fgets() s NULL . ungetc() c EOF . attributes(7). +------------+------------------------------------+--------------------+ || | | +------------+------------------------------------+--------------------+ |fgetc() | | MT-Safe | |fgets() | | | |getchar()| | | |ungetc() | | | +------------+------------------------------------+--------------------+ C11, POSIX.1-2008. POSIX.1-2001 C89. stdio read(2) . read(2) write(2) ferror(3) fgetwc(3) fgetws(3) fopen(3) fread(3) fseek(3) getline(3) gets(3) getwchar(3) puts(3) scanf(3) ungetwc(3) unlocked_stdio(3) feature_test_macros(7) 3 . . : . 6.18 8 2026 fgetc(3)