Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to write palindrome program?

Answer Posted / shweta

when we do reverse any no then we find a new no and this
no is equal to our privous no,which is called palindrom no.
by program
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n,m,sum=0,l;
printf("enter any no");
scanf("%d",&n);
while(n>0)
{
m=n%10;
sum=sum*10+m;
n=n\10;
}
if(n==l)
{
printf("no is palindrom");
}
else
{
printf("no is not palindrom");
}
getch();
}

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

1261


What is clrscr ()?

1100


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1075


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

1246


Can you write the function prototype, definition and mention the other requirements.

1114


How will you write a code for accessing the length of an array without assigning it to another variable?

1032


Why we write conio h in c?

1012


Explain About fork()?

1099


Why is %d used in c?

995


What are pragmas and what are they good for?

978


What library is sizeof in c?

1072


Combinations of fibanocci prime series

1599


How can I automatically locate a programs configuration files in the same directory as the executable?

1147


write a program to concatenation the string using switch case?

2083


In a header file whether functions are declared or defined?

1117