ProAnswers.org

how to Write a C function that reverses the words in a string without using any memory overhead.

how to Write a C function that reverses the words in a string without using any memory overhead.??

This is I guess what you are looking for

char* strrev(char *s)
{
int i, j;
char *t;
strcpy(t,s);
for(i = 0 , j = strlen(s) - 1 ; j >= 0 ; i++, j–)
*(s + i) = *(t + j);
return s;
}