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

Explain what is the difference between a free-standing and a hosted environment?

1182


cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

1101


What is boolean in c?

1088


How are strings stored in c?

1012


Why we write conio h in c?

1029


What is self-referential structure in c programming?

1212


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

1511


How is a pointer variable declared?

1086


Explain the term printf() and scanf() used in c language?

1048


Explain function?

1086


What is double pointer?

994


What is fflush() function?

1132


If errno contains a nonzero number, is there an error?

1367


What are the restrictions of a modulus operator?

1119


What is LINKED LIST? How can you access the last element in a linked list?

1070