gets()

This is a File I/O function. It is not implemented in the Compiler.

Syntax
  #include <stdio.h>

  
  char *gets(char *s);

  
Description

gets() reads a string from stdin and stores it in s. It stops reading when it reaches a line break or EOF character. This character is not appended to the string. The string is zero-terminated.

If the function reads EOF before any other character, it sets stdin's end-of-file flag and returns unsuccessfully without changing string s.

Return

NULL, if there was an error; s otherwise.

See also

fgetc() and

puts()