Infosys interview question

reverse a string