home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / tyc / list10_5.c < prev    next >
C/C++ Source or Header  |  1993-10-16  |  277b  |  15 lines

  1.  /* Demonstrates using the gets() library function. */
  2.  
  3.  #include <stdio.h>
  4.  
  5.  /* Allocate a character array to hold input. */
  6.  
  7.  char input[81];
  8.  
  9.  main()
  10.  {
  11.      puts("Enter some text, then press Enter");
  12.      gets(input);
  13.      printf("You entered %s", input);
  14.  }
  15.