Synopsis

#include <stdio.h>

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

Description

  • Reads a line from the specified stream and stores it into the string pointed to by str. It stops when either (n-1) characters are read,
  • the newline character is read, or the end-of-file is reached, whichever comes first.

Return value

Errors