Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>gets</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
gets

Usage

   #include <stdio.h>
   char *gets(char *str);

   ANSI

Description

   Read characters from stdin into the string str until a newline is read or
   an end-of-file is encountered. Newlines are not written to the string.
   The string is terminated with a 0. str must be large enough to hold the
   resulting string.

Example 

   #include <stdio.h>
   #include <stdlib.h>

   int main()
   {
       char buffer[125];
       printf("Type in a string: ");
       gets(buffer);
       printf("The string typed was: %s\n",buffer);
       return EXIT_SUCCESS;
   }

Return Value

   Returns str if successful. A NULL is returned if an end-of-file is
   encountered and no characters have been written to str, or if a read
   error occurs.

See Also

   fgets, fgets, puts puts



See Also: fgets fgets puts puts

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson