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

Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2625


How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

1127


What are the two shift operators and what are their functions?

1141


What is a terminating character in c++?

1444


What is a flag in c++?

1105


What are friend functions in C++?

1117


What is a base class?

1177


What is the difference between #import and #include in c++?

1167


What does std mean in c++?

1195


What is oops in c++?

1111


Explain the term memory alignment?

1302


Why should we use null or zero in a program?

1097


Explain how a pointer to function can be declared in C++?

1106


How can we access protected and private members of a class?

1162


What are put and get pointers?

1183