Cognizant Interview Question

code to perform string reversal