String reverse problem

hii
statement : given a string of length l reverse the word in it.
example 1:
input=technology
output=technology.

example 2:
input :world is my country

output: country my is world

i am stuck here mad logic but getting wrong result
please help me.
code i have written:

hint: try to use array, store each word in an array and then reverse that array.
store words and not char.

can you provide ant refernence i will be helpfull to me.

Check this

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.