Hope the above comments help. Str is a pointer, and you can add to pointers, to "walk" through data. The pointer will know the size of the thing it's pointing to, so it will be sized right for the job.
#define MAXLINE 100
static void reverse(char *str)
char *w = word;
while (*str == ' ')
++str; //let's str skip over white space.
if ( *str == '\0' ) //str has found the end of string char, we're done here.
while (*str != '\0' && *str != ' ') //if str is pointing at a letter, not a space, and
*w++ = *str++; //not an end of string char, then
*w = '\0'; //we've got another w, and increment str, please!
reverse(str) //we're not at the end, more words to follow, so
printf("%s ",word); //mark this word just found, with an end of string char
} //and print it.
int main ( )
printf("Enter a sentence:\n");