home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / datafiles / text / c_tutor / backward.c < prev    next >
C/C++ Source or Header  |  1995-02-27  |  403b  |  23 lines

  1. main()
  2. {
  3. char line_of_char[80];
  4. int index = 0;
  5.  
  6.    strcpy(line_of_char,"This is a string.\n");
  7.  
  8.    forward_and_backwards(line_of_char,index);
  9.  
  10. }
  11.  
  12. forward_and_backward(line_of_char,index)
  13. char line_of_char[];
  14. int index;
  15. {
  16.    if (line_of_char[index]) {
  17.       printf("%c",line_of_char[index]);
  18.       index++;
  19.       forward_and_backward_call(line_of_char,index);
  20.    }
  21.    printf("%c",line_of_char[index]);
  22. }
  23.