int wordcount = 0, strcount = 0, revcount = 0, strposition = 0; // counters n stuff
char string [100], word [10], rev [10]; // obvious
while (string[strcount] != '\0') // till end of string
{
strposition = strcount; //save current position
while (string[strcount] != ' ') // word has started
word [wordcount++] = string [strcount++]; //move along the word, copying the entire word to buffer
while (wordcount >= 0)
rev [revcount++] = word [wordcount--]; //classic reversing the word loop
while (revcount >= 0) // move back to where the word started(we saved the position remember?)
string [strposition++] = rev [revcount--]; // copy the reversed word to the place, overwriting word
}