FGETS(3) BSD Library Functions Manual FGETS(3)
fgets, gets -- get a line from a stream
Standard C Library (libc, -lc)
fgets(char *restrict s, int n, FILE *restrict stream);
The fgets() function reads at most one less than the number of characters specified by n from the given stream and stores them in the string
s. Reading stops when a newline character is found, at end-of-file or error. The newline, if any, is retained. If any characters are read
and there is no error, a '