Cognizant Interview Question

Program to reverse a string