Capgemini Interview Question

Write the code if instead of a string a number is given and you have to reverse it.