my program needs to have the user enter a string and have it output backwards, not in reverse order. This is what I have so far, any help would be appreciated. I was trying to use memmove but I think I'm going in the wrong direction. Thanks Carl.
#include <stdio.h>
#include <string.h>
int main(void)
{
char string [ 80 ];
char *tokenPtr;
printf( "enter text\n" );
gets( string );
tokenPtr = strtok( string, "" "");
while ( tokenPtr != NULL ) {
printf( "%s\n", tokenPtr );
tokenPtr = strtok( NULL, "" "" );
}
printf( "%s%s\n", "the text before memmove is:", string );
printf( "%s%s\n", "the text after memmove is:",
memmove( string, &string[5], 10 ));
system("PAUSE");
return 0;
}