*sigh*
Okay, just to shut you up (because you're obviously not listening or trying), I'll give you not only the C translation, but I'll even correct the errors:
#include <stdio.h>
#include <string.h>
void reverse ( const char *word )
{
size_t len = strlen ( word );
while ( --len < (size_t)-1 )
putchar ( word[len] );
putchar ( ' ' );
}
int main ( void )
{
char line[1024];
while ( fgets ( line, sizeof line, stdin ) != NULL && *line != '\n' ) {
char word[1024];
char *p = line;
int n = 0;
while ( sscanf ( p, "%1024s%n", word, &n ) == 1 ) {
reverse ( word );
p += n;
}
}
return 0;
}
Don't expect me to be as nice the next time you completely ignore my help. Now shoo.