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 heap sort in c++?

1028


What do you mean by ‘void’ return type?

1016


Write about a nested class and mention its use?

1074


Why would you use pointers in c++?

1117


What is data hiding c++?

1012


Why is c++ still best?

945


If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?

1467


What is prototype in c++ with example?

1090


What is the equivalent of Pascal's Real a) unsigned int b) float c) char

985


What gives the current position of the put pointer?

962


Define what is constructor?

1027


What are the uses of typedef in a program?

1050


Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?

2149


What can I safely assume about the initial values of variables which are not explicitly initialized?

1028


How do you declare A pointer to function which receives an int pointer and returns a float pointer

1146