#include int main(void) { int i,j; int wordstart = -1; int wordend = -1; char words[]= \"this is a test\"; char temp; // Reverse each word
Simply we can just use a n*1 2D character array tailored to suit our needs!!!
#include int main() { char s[20][20]; int i=0, length=-1; for(i=0;;i++) { scanf("%s",s[i]); length++; if(getchar()=='\n') break; } for(i=length;i>=0;i--) printf("%s ",s[i]); return 0; }