GEM Partnership interview question

reverse a words in string some basic os and dbms question