Like Us Like Us Facebook Subscribe Subscribe us YouTube Whatsapp Share us Whatsapp Query Send your queries

Checking Given Integer is Palindrome or Not

Checking Given Integer is Palindrome or Not

According to  A Palindrome is a word, phrase, number, or
other sequence of characters which reads the same backward or forward.
Allowances may be made for adjustments to capital letters, punctuation,
and word dividers. So I am going to to show how to check whether a given integer is  Palindrome or Not using C.Environment:
OS- Linux (kubuntu 16.04)
Compiler – GCC
IDE -Codeblock

include <stdio.h>
To check if a string is a palindrome or not,
a string needs to be compared with the reverse of itself.

int main(){
int n;
int reverseno = 0;
int remainder;
int originalno;

printf("Please enter a integer :");
originalno = n;

remainder= n%10;
reverseno= reverseno *10 +remainder;

if(originalno == reverseno)
printf("%d is a palindrome.", originalno);
printf("%d is not a palindrome.", originalno);
return 0;

Screen shot :

You can do it palindrome  check in any language like PHP, Javascript, Python, Ruby , Java , just change the code little bit .

0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Newest Most Voted
Inline Feedbacks
View all comments
Ramesh K

Thanks for sharing this informative information…You may also refer….
How to migrate from a typical HTML4 page to a typical HTML5 page.


The website is looking bit flashy and it catches the visitors eyes. A design is pretty simple .