Synopsys interview question

Reverse the words inside a string.