home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap16 / backward.c next >
Encoding:
C/C++ Source or Header  |  1988-04-07  |  298 b   |  16 lines

  1. /* backward.c -- the backwards word displayer         */
  2.  
  3. #include <stdio.h>
  4. #define SIZE 5
  5. char word[SIZE] = "trap";
  6. main()
  7. {
  8.     unsigned int index;
  9.  
  10.     printf("%s backwards is ", word);
  11.     for (index = SIZE - 2; index >= 0; index--)
  12.     putchar(word[index]);
  13.     putchar('\n');
  14. }
  15.  
  16.