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

char a[20],b[20];
printf("enter a string");
scanf("%s",&a);
strcpy(b,a);//copies string a to b
strrev(b);//reverses string b
if(strcmp(a,b)==0)//compares if the original and reverse
strings are same
printf("\n%s is a palindrome",a);
else
printf("\n%s is not a palindrome",a);
return 0;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism and its type in c++?

1069


What is data type in c++?

1010


the first character in the variable name must be an a) special symbol b) number c) alphabet

1091


Will the following program execute?

1030


Where is atoi defined?

1138


Can static member variables be private?

1173


Why is c++ called oops?

1165


What are built-in functions? What is the syntax for the definition?

1079


What is buffer and example?

1005


What is a block in c++?

1048


What is prototype for that c string function?

1132


What is the difference between C and CPP?

1157


what Is DCS ? what i will get benefit when i did?

2355


What is static function? Explain with an example

1069


What is private public protected in c++?

1048