Infosys Interview Question

coding ques to reverse string