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

palindrome for strings and numbers----Can anybody do the
prog?

Answer Posted / sree

#include<stdio.h>
void main
{
int n,t,d,r;
printf("Enter the number:");
scanf("%d",&n);
t=n;
while(n>=1)
{
d=n%10;
r=(r*10)+d;
n=n/10;
}
if(t==r)
printf("Palindrome");
else
printf("Not a palindrome");
}

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a code to generate a series where the next element is the sum of last k terms.

1289


What is a substring in c?

1083


Why do we use main function?

1234


Write a code of a general series where the next element is the sum of last k terms.

1092


What does it mean when a pointer is used in an if statement?

1155


What is #define in c?

1107


What is malloc return c?

1080


State the difference between realloc and free.

1145


Why doesnt the call scanf work?

1243


What is a built-in function in C?

1669


What is the difference between Printf(..) and sprint(...) ?

1634


What does %2f mean in c?

1282


What are terms in math?

1097


what value is returned to operating system after program execution?

2180


How is a macro different from a function?

1245