FANDOM


/* Tomi Babalola and Kevin Duke */
/* Lab 08 */
/* 11-21-09 */
 
#include <stdio.h>
#include <string.h>
#define NUM_WORD 20
 
void wordreverse(char words[])
{
 int i;
 int c;
 char n;
   for (i = 0 < words[i]!= '\0'; i++) 
   {
      if (words[i]; (strlen(words)/2))
      {
            n = words[i];
            words[i] = words[strlen(words) - i - 1];
            c = words[strlen(words) - i - 1];
      }
   }
}
 
int
main(void)
{
 int i;
 char words[NUM_WORD];
 
 printf("Enter a word: \n");
 
 scanf("%s", words);
 
 wordreverse(words);
 printf("%s\n", words);
return 0;
}