home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / dev / misc / RemCom.lha / example.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-13  |  566 b   |  25 lines

  1. /*      This is an example to test RemCom
  2.         ©1992 by Dalibor S. Kezele              */
  3.  
  4. char word1[80];         /* Source word */
  5. char word2[80];         /* Destination word */
  6.  
  7. int i,j;                /* Counters */
  8.  
  9. /* Here it is ! */
  10.  
  11. void main(void)
  12. {
  13.         printf("Enter a word :");
  14.         scanf("%s", &word1);
  15.         j=strlen(word1);
  16.         word2[j] = i = 0;
  17.         while(--j >= 0)
  18.                 word2[i++] = word1[j];
  19.         puts(word2);
  20. } /* main */
  21.  
  22. /* Now start RemCom with something like
  23.  
  24.         RemCom -C example.c nocomment.c         */
  25.