Cognizant Interview Question

WAP to reverse number