Cognizant interview question

Write a program to reverse the string.