MicrOS
gets.c File Reference
#include "../stdio.h"

Functions

char * gets (char *str)
 Get string from stdin. More...
 

Function Documentation

◆ gets()

char* gets ( char *  str)

Get string from stdin.

Reads characters from the standard input (stdin) and stores them as a C string into str until a newline character or the end-of-file is reached.

Parameters
strPointer to a block of memory (array of char) where the string read is copied as a C string.
Returns
On success, the character read is returned. If the position indicator was at the end-of-file, the function returns EOF.