# What is palindrome number in C?

In this article, we are going to cover the following points

- What is Palindrome number in C?
- Algorithm of Palindrome number
- Implementation of Palindrome Program

Palindrome numbers are referred to as those numbers which give the same number after reversing that number.

For example: Suppose a given number is 1551, then the palindrome number of the given number will be 1551.

2) Palindrome number of 343 will be 343.

## Algorithm for Palindrome number in C

Lets write the basic algorithm to check whether the given number is palindrome or not.

- Get the number as input from the user.
- Hold the given number in a new temporary variable.
- Reverse the given number.
- Compare the temporary number with a reversed number.
- If both the temporary number and reverse numbers are the same, then the given number will be palindrome else number is not a palindrome.

## Implementation of Algorithm

Write a program to reverse a number and check whether a given number is palindrome or not.

#include int main() { int i=1551,j; j = i; int n,rem,quo,newnumber=0; for(n=1;n<=4;n++) { rem=i%10; if(n == 4) { newnumber=(newnumber+rem); } else { newnumber=(newnumber+rem)*10; } quo=i/10; i=quo; } printf(" New number = %d",newnumber); printf(" Old number = %d",j); if(j == newnumber) { printf(" Palindrome"); } else { printf(" Not Palindrome"); } }

## Output

New number = 1551 Old number = 1551 Palindrome

How was the tutorial? Nice. Right?

## Deep Concept videos to crack the highly-piad interviews.

Chekout out our Youtube Channel to get detailed video content on important topics in interviews.

## What is your Interview Score?

Test your skillset with the curated questions created by experts around the globe.

Book a free test slot. Now !.

It usually takes 30 mins for an online test and this test will be MCQ based. Get detailed analytics based on your test and recommedations with personalised roadmaps.

Book a test slot. Now!## Recommended tutorials