Cognizant Interview Question

Program for string revrsal