Function fgets

Top 

Declaration:

int fgets(char dest[], int n, unsigned long stream);

Description

Gets a string from a stream.

fgets reads characters from stream into the dest string. The function stops reading, when it reads either n-1 characters or the newline character, which event comes first. fgets retains the newline character at the end of dest. The null byte is appended to s to mark the end of the string.

Returned Value

TRUE is returned on success; and FALSE on the end-of-file or error.