If you have just started learning C programming and want to write a C Program of Palindrome number.
We have come up with the solution to your problems.
After learning the basic concept make two or three basic programs and then try this program.
What is a Palindrome number?
A Palindrome number is a special type of number in which the reverse of the number is equal to the number itself.
For Example – 121 is a palindrome number because reverse of number will be equal to the number itself.
C Program of Palindrome number –
int Original_number, result = 0, temp;
printf("Enter a number to check if it's a palindrome or not");
temp = Original_number;
while (temp != 0)
result = result * 10;
result = result + temp%10;
temp = temp/10;
if (Original_number== result)
printf("%d is a palindrome number.\n", Original_number);
printf("%d isn't a palindrome number.\n", Original_number);
Output of Program – Enter a number to check if it’s a palindrome or not 343 343 is a palindrome number.
Advantages of Palindrome Number Program
- Palindrome number program is one of the most asked programming questions in the technical interviews of many major IT Companies.
- In your College/University exams you can get this question many times. So, it will increase your marks.
- After doing this program, you will learn how we can separate digits from the number.
- This program will help you in solving many other major problems.
For running the program online, check this online compiler.
Frequently Asked Questions –
Yes, the program is very important from placement as well as the point of an exam of view.
Yes, the speed of the program will decrease only.
212, 343,5445 all are palindrome numbers.