Everything

gets


Inputs a string from the standard input file (stdin).

[Format]

#include <stdio.h>

char *gets (char *s);

[Parameters]

s Pointer to storage area to which string is input

[Return values]

Normal: End-of-file: NULL

Otherwise: s

Abnormal: NULL

[Remarks]

The gets function inputs a string from the standard input file (stdin) to the storage area starting at s.

The gets function inputs characters up to end-of-file or until a new-line character is input, and appends a null character instead of a new-line character.

The gets function normally returns s, the pointer to the storage area to which the string is input, but returns NULL at the end of the standard input file or when an error occurs.

The contents of the storage area pointed to by s do not change at the end of the standard input file, but are not guaranteed when an error occurs.