**Palindrome number** is that number which when reversed, is equal to the original number.

**E.g 111, 121, 8008 etc. **

In this C program, we will **check whether a number is a palindrome or not**.

To check palindrome number in C, we will use while loop and division with 10. Because the number of digits is equal to the number of times a number is divisible by 10 (*number / 10 ! = 0*) followed by the number is equal to the quotient of the division (*number = number /10*).

- Take integer as input.
- Run while loop until
*number = 0*i.e*while(number != 0)* - Divide the number by 10
- Store the remainder into another variable
*reverse*as stated*reverse = reverse *10 + remainder* - Update the number as
*number = number/10* - Now outside of loop check if
*reverse == original_number* - If YES then number is palindrome else Not palindrome.

## Check Palindrome Number in C

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #include <stdio.h> #include <stdlib.h> int main() { int original_number, number, remainder, reverse =0; printf("Enter a Number \n"); scanf("%d",&original_number); number = original_number ;//By copying original_number we are keeping it safe from changes while(number != 0){ remainder = number % 10; reverse = reverse * 10 + remainder; number = number / 10; } if(original_number == reverse) printf("Palindrome \n"); else printf("Not Palindrome \n"); return 0; } |

**Output**

When the input number is 456

When the input number is 121

That much only we require to do to check palindrome number using C language. If you have any doubt then comment below.