Question d’entretien chez Cognizant

Write a code for checking prime numbers. Write a code to reverse a number.