scanf(3) Library Functions Manual scanf(3) scanf, fscanf, vscanf, vfscanf - (libc -lc) #include int scanf(const char *restrict format, ...); int fscanf(FILE *restrict stream, const char *restrict format, ...); #include int vscanf(const char *restrict format, va_list ap); int vfscanf(FILE *restrict stream, const char *restrict format, va_list ap); glibc ( feature_test_macros(7)): vscanf(), vfscanf(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L scanf() sscanf(3) FILE. fgets(3) getline(3) sscanf(3) strtol(3). scanf() stdin fscanf() stream. vfscanf() vfprintf(3) stream ( stdarg(3). vscanf() vprintf(3) . . EOF . EOF ( ferror(3)) errno . EAGAIN stream . EBADF stream . EILSEQ . EINTR signal(7). EINVAL format NULL. ENOMEM . attributes(7). +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ | | | | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ |scanf(), fscanf(), | | (locale) (MT-Safe) | |vscanf(), vfscanf() | | | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ C11, POSIX.1-2008. C99 POSIX.1-2001. . . . . "123\n a" scanf("%d %d", &a, &b) a. . fgets(3), getline(3), sscanf(3) 3 . . : . 6.18 21 2025 scanf(3)