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 c++ map?

1248


Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h

1184


What is stl containers in c++?

1091


What are the stages in the development cycle?

1110


Define anonymous class.

1135


Is there a c++ certification?

1103


Explain the pure virtual functions?

1171


What do you mean by persistent and non persistent objects?

1495


What is constant in c++ with example?

1206


Why is c++ awesome?

1085


When there is a global variable and local variable with the same name, how will you access the global variable?

1159


What is the main use of c++?

1168


Which programming language's unsatisfactory performance led to the discovery of c++?

1398


Write about the role of c++ in the tradeoff of safety vs. Usability?

1128


find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

2606