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 / rupamrox

#include<stdio.h>
#include<conio.h>
main()
{
int n,m,p,rev;
clrscr();
printf("enter a number: ");
scanf("%d",&n);
p=n;
rev=0;
while(n>0)
{
m=n%10;
rev=rev*10+m;
n=n/10;
}
if(rev==p)
printf("%d is palindrome",p);
else
printf("%d is not palindrome",p);
getch();
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between set and map in c++?

1146


What do you mean by persistent and non persistent objects?

1444


What is tellg () in c++?

1322


What are the stages in the development cycle?

1073


What does n mean in c++?

1178


How can virtual functions in c++ be implemented?

1142


What is the benefit of learning c++?

1005


What is pointer -to-members in C++? Give their syntax?

1039


Carry out conversion of one object of user-defined type to another?

1052


Differentiate between a copy constructor and an overloaded assignment operator.

1095


Can we overload operator in c++?

1048


What is a pointer with example?

1273


Can there be at least some solution to determine the number of arguments passed to a variable argument list function?

1021


What is abstract keyword in c++?

1084


What is the basic structure of c++ program?

1114