Cognizant interview question

Write a code to reverse a sting in cpp.