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

how to write palindrome program?

Answer Posted / a.prathyusha

#include<stdio.h>
void main()
{
int n,s=0,r,n1;
printf("enter any number:");
scanf("%d",&n);
n1=n;
while(n>0)
{
r=n%10;
s=(s*10)+r;
n=n/10;
}
if(s==n1)
printf("palindrom");
else
printf("not palindrom");
}

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are types of preprocessor in c?

1079


What kind of structure is a house?

1048


What is use of #include in c?

1172


What are the loops in c?

1000


What is the difference between if else and switchstatement

1942


What is the function of volatile in c language?

1140


The file stdio.h, what does it contain?

1173


Why c is called object oriented language?

1075


ATM machine and railway reservation class/object diagram

5254


Define circular linked list.

1041


What is a void pointer in c?

1115


Explain how can I write functions that take a variable number of arguments?

1087


Are there constructors in c?

1017


Where are some collections of useful code fragments and examples?

1166


How can I do serial ("comm") port I/O?

1185