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...

write program for palindrome

Answer Posted / vijay kumar

#include<stdio.h>
#include<conio.h>
void main()
{
int n,rev=0,m,r;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
rev=rev*10+r;
n=n/10;
}
if(rev == m) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to pass an object of the same class in place of object reference to the copy constructor?

977


What is public, protected, private in c++?

1097


What relational operators if statements in c++?

1113


What is the auto keyword good for in c++?

1115


What is size_type?

962


Does c++ have foreach?

978


What is class and structure in c++?

1072


What is the return value of the insertion operator?

1082


Explain how a pointer to function can be declared in C++?

977


How the virtual functions maintain the call up?

1083


What are enumerations?

1048


What is c++ hash?

1051


What do you understand by a pure virtual member function?

938


Keyword mean in declaration?

999


Out of fgets() and gets() which function is safe to use and why?

1127