|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
#include <stdio.h> char *fgets(char *buffer, int maxlength, FILE *file);
This function reads as much of a line from a file as possible, stopping
when the buffer is full (maxlength-1 characters), an end-of-line
is detected, or
EOF or an error is detected. It then stores a
NULL to terminate the string.
The address of the buffer is returned on success, if
encountered before any characters are stored, or if an error is
NULL is returned instead.
|ANSI/ISO C||C89; C99|
char buf; while (fgets(buf, 100, stdin)) fputs(buf, stdout);
|webmaster||delorie software privacy|
|Copyright © 2004||Updated Apr 2004|