Cognizant interview question

Program to reverse a string