Cognizant Interview Question

write a program to reverse a digit?