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 / pallavi attarde

#include<iostream.h>
#include<string.h>

int main()
{
char str[25],str1[25];
cout<<"Enter a string: ";

gets(str);

strcpy(str1,str);
strrev(str);
if(strcmp(str,str1)!=0)
{
cout<<"string is not palindrome";
}
else
{
cout<<"string is a palindrome";
}

cout<<endl;

Is This Answer Correct ?    596 Yes 248 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal

1181


Define virtual constructor.

1104


What is the purpose of templates in c++?

1040


What is a modifier in c++?

1160


What is #include sstream?

1077


What is the basic structure of c++ program?

1108


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

2494


Explain about templates of C++.

1158


Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?

1094


Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be

1424


What are the various arithmetic operators in c++?

1136


Is c++ the best programming language?

1029


What are features of c++?

1193


What are punctuators in c++?

1174


What is the difference between global variables and local variable

1073