fgets


Read one line from stream

Remark

These functions are not supported by the debugging functions which CS+ provides.

[Classification]

Standard library

[Syntax]

#include <stdio.h>

char *fgets(char *s, int n, FILE *stream);

[Return value]

s is returned.

Error return does not occur.

[Description]

This function inputs at most n-1 characters from the input stream pointed to by stream and stores them in s. Character input is also ended by the detection of a new-line character. In this case, the new-line character is also stored in s. The end-of-string null character is stored at the end in s. Only the standard input/output stdin can be specified for stream.