Reverse a string without string function

Hello,
Though I have done this question without string functions but can anybody give me short algorithm for this. Here is the question:
Write a program that reverse the words in a sentence:
Enter a sentence: you can cage a swallow can't you?
Reversal of sentence: you can't cage a swallow can you?

Here is the Hint I've found in the book:Use a loop to read a character one by one and store them in an array. Have the loop stop at a period, question mark, or exclamation point( the "terminating character"), which is saved in a separate char variable. Then use a second loop to search backward through the array for the beginning of the last word. Print the last word, then search backward for the next-to-last word. Repeat until the beginning of the array is reached. Finally, print the terminating character.

This program must be done without <string.h> header functions, no gets(), no puts(), only getchar() or scanf() functions.
Here is my solution:

Enter a sentence: you can cage a swallow can't you?
Reversal of sentence: you can't cage a swallow can you?

I'm assuming you meant the reversal to be "you can't swallow a cage can you?", because the one you posted would require a bit more work in specifying which words are being reversed as opposed to reversing all of them.

Hey, I already mention that the question must be done without string.h header function. I can also do this by your way, but I want to do this without string.h header function.
And by the way, my solution is right in all the way. If you have any solution without the use <string.h> header function, then provide it. Also this is not a homework.

Hey, I already mention that the question must be done without string.h header function.

And I'm not going to do your homework for you.

I can also do this by your way, but I want to do this without string.h header function.

The only thing I used from string.h is the non-portable strrev() function, which is super easy to write. You can even learn how to write it by looking at the code I gave you. What I'm getting from your response is that you didn't bother to read the whole of my post and refuse to take similar code and learn from it to write code better suited to your specific problem.

In other words, why should I bother helping further when you don't seem interested in helping yourself?

Also this is not a homework.

It's an assignment of some sort that you've been given or taken upon yourself to complete. Therefore, it's homework under Daniweb's definition of the word.

hey,
First thing I mention that this is not a homework and I don't want to use any string method, size_t because this question is from the book where I have to do this by using array, getchar(), putchar(), scanf() or printf(), loops only which I've already done it. I just asked that is there is any shorter version of this using only loops and without string.h and ctype.h header.
The answer you have mention is easily found on the web and answer I've done is only one done by me.

King book where no strings are covered and I have to do this only by arrays and loops not by string functions like you.

Can you not read? I already stated that the only string function I used was strrev(). I also essentially duplicated the effect of strrev() later in the code without using any other string functions. You can replace size_t with int, the strrev() call with a facsimile and there will be nothing from the string.h header used in that code. It's mostly a manual solution, though to be honest that's only because strrev() isn't suitable for reversing substrings.

I can't tell if you're really as stupid as you're presenting yourself, or just pissed off that I'm forcing you to use your brain and do actual work.

I think you can't solve this question by another method without strings.

If you mean without string functions provided by the standard library then I'll direct you to exhibit A, where I've written all of those functions. I'm in no way dependent on the standard library. If it's not there, I'll just write it myself (and I have). Can you do the same?

So you might consider that just because someone refuses to do your homework for you, it doesn't mean they're unable to do it.