C Program to check given number is Palindrome number or not

Q.: Write a C Program to check given number is Palindrome number or not.

What is Palindrome Number?

Palindrome number is a number which is when reversed then it is exactly same as that of original number.

The following program is used to check number is a palindrome number or not

Source Code:

#include<stdio.h>
#include<conio.h>
void main()
{
	int no,rev=0,rem,ori;
	clrscr();
	printf("n Enter any Number : ");
	scanf("%d",&no);
	ori=no;
	while(no>0)
	{
		rem=no%10;
		rev=(rev*10)+rem;
		no=no/10;
	}
	if(ori==rev)
		printf("nn Given number is Palindrome !");
	else
		printf("nn Given number is Not Palindrome !");
	getch();
}

Output:

Fig.: Output Screen

Download Now (.Zip File)…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.