home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / ctutor2.zip / STRINGIN.C < prev    next >
Text File  |  1989-11-10  |  602b  |  31 lines

  1.                                           /* Chapter 9 - Program 5 */
  2. #include "stdio.h"
  3.  
  4. void main()
  5. {
  6. char big[25];
  7.  
  8.     printf("Input a character string, up to 25 characters.\n");
  9.     printf("An X in column 1 causes the program to stop.\n");
  10.  
  11.     do {
  12.        scanf("%s",big);
  13.        printf("The string is -> %s\n",big);
  14.     } while (big[0] != 'X');
  15.  
  16.     printf("End of program.\n");
  17. }
  18.  
  19.  
  20.  
  21. /* Result of execution
  22.  
  23. Input a character string, up to 25 characters.
  24. An X in column 1 causes the program to stop.
  25.  
  26. (The output depends on what you type in.)
  27.  
  28. End of program.
  29.  
  30. */
  31.