Infosys interview question

Simple programs like reverse string