gets is used to read a line of data from
STDIN. By default STDIN is the
keyboard. gets continues to read characters until NEWLINE or EOF
Prototype: char *gets(char *s);
Syntax: char read_line;
- gets does NOT check the size of the buffer and overflow on the
stack can occour. Because of this, you should use
fgets in preferance.
character is NOT placed in the buffer.
fgets will retain the
showing fgets and gets in action.