Question d’entretien chez Tech Mahindra

Write a code to check whether a given number is palindrome.