Table of Contents
C program to check palindrome number
If number can be read in both direction in same order then the number is palindrome number in nature.
In simple words, if a number is reversed and its still retains same order as that of original number then the number is said to be palindrome number.
E.g. The output obtained by reversing number 121 matches the original number hence, 121 is palindrome number.
Palindrome number logic in C programming.
Logic to check palindrome number in C
#include<stdio.h>
int main()
{
int num,og,rmd,rst=0;
printf("Enter any number=");
scanf("%d",&num);
og=num;
while(num>0)
{
rmd=num%10;
rst=(rst*10)+rmd;
num=num/10;
}
if(og==rst)
{
printf("%d is a palindrome number",og);
}
else
{
printf("%d is not a palindrome number",og);
}
return 0;
}
Output :
Enter any number=121
121 is a palindrome number
PRACTICALS/PRACTICE PROGRAM IN C
CHECKOUT OTHER RELATED TOPICS
CHECKOUT OTHER QUIZZES
Quizzes on Operator |
Easy Quiz on Operators in C part 1 |
Easy quiz on operators in C part 2 |
Easy quiz on operators in C part 3 |
Quizzes on Loops |
Easy quiz on loops in C part 1 |
Easy quiz on loops in C part 2 |
Easy quiz on loops in C part 3 |
Quizzes on Decision Making Statement |
Easy Quiz On Decision Making Statements Part 1 |
Easy Quiz On Decision Making Statements Part 2 |
Quizzes on String |
Easy quiz on String in C programming part 1 |
Quizzes on Array |
Easy quiz on Array in C programming – part 1 |
5 – Best Java program to convert decimal to binary |
New Quizzes Coming soon.. |
We are aiming to explain all concepts of C in easiest terms as possible.

ITVoyagers
Author