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

Comment on c++ standard exceptions?

1039


What does flush do?

942


What is istream and ostream in c++?

1053


What is the rule of three?

947


Are strings immutable in c++?

1113


Explain the static storage classes in c++.

1195


What is called array?

1018


What is namespace std; and what is consists of?

1221


What is c++ and its features?

972


What is the meaning of c++?

967


Define the operators that can be used with a pointer.

994


Can member functions be private?

958


Is c++ still in demand?

1107


Why do we need pointers?

951


How is new() different from malloc()?

1063