2.1.5. fgets()

int fgets(string s, int n, int filehandle)

Reads, at most, the next n-1 characters into the string s from the file being associated with filehandle. If a newline is encountered, the newline is included in the string. The string is terminated by "\0".

Note

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 filehandle occurred.

Copyright © 2007-2011 ARM. All rights reserved.ARM DUI 0371J
Non-ConfidentialID051712