Cognizant Interview Question

Write a code for reverse string