C Program to check whether given Integer is Palindrome or Not

Sample Input 1 :

656

Sample Output 1 :

Palindronme (Reverse of 656 is 656)

Flow Chart Design

C Program to check whether given Integer is Palindrome or Not Flow Chart

Program or Solution

				
			
					
#include<stdio.h>
int main()
{
	int num,rev,rem;
	scanf("%d",&num);
	while(num!=0)
	{
		rem=num%10;
		rev=rev*10+rem;
		num/=10;
	}
	printf("Reverse is %d",rev);
	return 0;
}
		
			
				
			

Output

C Program to check whether given Integer is Palindrome or Not Output

Program Explanation

refer video tutorial

Comments