Cognizant Interview Question

Write a program to reverse the string.