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 / saurav sadangi

#include<stdio.h>

int main(){
int n,s=0,r,m;
printf("Enter m:- ");
scanf("%d",&m);

n=m;

while(m>0){
r=m%10;
s=(s*10)+r;
m/=10;
}
printf("The reverse no is %d\n",s);

if (s==n)
printf("%d is pallendrom.\n",n);
else
printf("%d is not pallendrom.\n",n);

system("PAUSE");
return 0;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explicitly call a destructor on a local variable?

995


What is a literal in c++?

1037


Explain overriding.

961


Explain how the virtual base class is different from the conventional base classes of the opps.

1121


What sorting algorithm does c++ use?

1098


Explain explicit container.

1050


What would happen on forgetting [], while deallocating an array through new?

1047


Is c++ fully object oriented?

930


If I is an integer variable, which is faster ++i or i++?

1037


Where must the declaration of a friend function appear?

927


Differentiate between late binding and early binding. What are the advantages of early binding?

999


What is scope in c++ with example?

1068


Differentiate between a template class and class template in c++?

1066


Differentiate between structure and class in c++.

1040


Is main a class in c++?

978