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

#include<stdio.h>
#include<conio.h>
int main()

{
long int n,s=0,m,r;
printf("enter any no");
scanf("%ld",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==s)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between Abstraction and encapsulation in C++?

1172


What are the restrictions apply to constructors and destructors?

1096


What does getch() do according to the ANSI C++ standard a) Reads in a character b) Checks the keyboard buffer c) Nothing in particular (Its not defined there)

1071


What are the various arithmetic operators in c++?

1145


What is buffer and example?

1025


How to declaring variables in c++?

1171


What are the new features that iso/ansi c++ has added to original c++ specifications?

1158


What is auto used for in c++?

1064


Explain the problem with overriding functions

1172


When you overload member functions, in what ways must they differ?

1064


Do vectors start at 0 c++?

1039


Can we use struct in c++?

1034


What does catch(…) mean?

1130


If dog is a friend of boy, is boy a friend of dog?

995


find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

2569