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++ Language Reference - gets http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   gets

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

   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>
   main()
   {
   char buffer[125];
   printf("Type in a string: ");
   gets(buffer);
   printf("The string typed was: %s\n",buffer);
   }

   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 puts

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