#include int main(void) { int i,j; int wordstart = -1; int wordend = -1; char words[]= \"this is a test\"; char temp; // Reverse each word
You can create a double linked list as a base data structure. Then, iterate through the words and insert them in the list as you find them.
When you reach the end of the sentence, simply traverse the list backwards and print the words as you go through them