| |||
| Home > Common API > File input/output > fgets() | |||
int fgets(string s, int n, int filehandle)
Reads, at most, the next characters
into the string n-1 from
the file being associated with s.
If a newline is encountered, the newline is included in the string.
The string is terminated by filehandle"\0".
In contrast to ANSI C, fgets() returns
either:
the number of characters read
0 if the end of file was reached
or an error associated with occurred.filehandle