Cognizant interview question

Reverse a string and print it