(ANSI Standard)
#include <stdio.h> ptr = fgets( s, N, f );
"fgets" reads a maximum of N-1 characters from the input file "f" into the area of memory pointed to by "s". "fgets" will stop reading if it encounters a new-line character before N-1 characters have been read. The last character read into string "s" will be followed by a terminating '\0'.
If a read error occurs or end of file is reached, "fgets" returns a null pointer.
Copyright © 1996, Thinkage Ltd.