gets(3) Library Functions Manual gets(3) gets - () (libc -lc) #include [[deprecated]] char *gets(char *s); . gets() stdin s EOF ('\0'). ( ). gets() s NULL . . attributes(7). +------------+------------------------------------+--------------------+ || | | +------------+------------------------------------+--------------------+ |gets() | | MT-Safe | +------------+------------------------------------+--------------------+ POSIX.1-2008. C89, POSIX.1-2001. LSB gets(). POSIX.1-2008 gets() . ISO C11 gets() C glibc 2.16 glibc _ISOC11_SOURCE . gets() . gets() gets() . . fgets() . CWE-242 ( " ") http://cwe.mitre.org/data/definitions/242.html read(2), write(2), ferror(3), fgetc(3), fgets(3), fgetwc(3), fgetws(3), fopen(3), fread(3), fseek(3), getline(3), getwchar(3), puts(3), scanf(3), ungetwc(3), unlocked_stdio(3), feature_test_macros(7) 3 . . : . 6.18 8 2026 gets(3)