Cognizant interview question

Write program for reverse of string?