TSS Consultancy interview question

Reverse the words in string