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

How can you be sure that a program follows the ANSI C standard?

1558


What is typedef struct in c?

996


What is volatile, register definition in C

1056


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

1060


What is main () in c?

1010


application attempts to perform an operation?

1914


State two uses of pointers in C?

1008


Write a code to remove duplicates in a string.

981


Can a function argument have default value?

1091


How can I find out the size of a file, prior to reading it in?

1099


how could explain about job profile

1856


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

1168


What is the size of structure pointer in c?

1016


What functions are used in dynamic memory allocation in c?

1016


How many types of errors are there in c language? Explain

925