From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/FUNCTIONS/gets.html | 81 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 reference/C/FUNCTIONS/gets.html (limited to 'reference/C/FUNCTIONS/gets.html') diff --git a/reference/C/FUNCTIONS/gets.html b/reference/C/FUNCTIONS/gets.html new file mode 100644 index 0000000..400b7a5 --- /dev/null +++ b/reference/C/FUNCTIONS/gets.html @@ -0,0 +1,81 @@ +fgets function + + + + +
+

gets function

+
+

+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 +is seen. +

+ +

+Library:   stdio.h
+
+Prototype: char *gets(char *s);
+
+Syntax:    char read_line[80];
+
+	   gets( read_line);
+
+ +

Notes

+
    +
  1. 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. +

    + +

  2. The +NEWLINE +character is NOT placed in the buffer. +fgets will retain the +NEWLINE. + + + +example +showing fgets and gets in action.

    +


    +

    See Also:

    +