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

Can you please explain the difference between overloading and overriding?

1109


Why do we use classes in programming?

1044


What is implicit pointer in c++?

1093


Is recursion allowed in inline functions?

1091


What is the use of default constructor?

1102


How do you define a class in c++?

1089


Describe Trees using C++ with an example.

1161


What are the data types in c++?

951


Carry out conversion of one object of user-defined type to another?

1051


Write a Program to find the largest of 4 no using macros.

1083


Can java be faster than c++?

1161


What is ios in c++?

1223


Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

997


How would you use the functions randomize() and random()?

1087


How can you differentiate between inheritance and implementation in c++?

1222