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 / chintan

#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
clrscr();
char *a,*b,s1[10],s2[10];
cout<<"\n ENTER THE STRING : ";
cin>>s1;
strcpy(s2,s1);
a=s1;
b=s2;
strrev(s2);
cout<<s2;
if(strcmp(a,b))
cout<<" \n STRING IS NOT PALINDROME ";
else
cout<<" \n STRING IS PALINDROME ";
getch();
}

Is This Answer Correct ?    35 Yes 31 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How the programmer of a class should decide whether to declare member function or a friend function?

1126


Explain the benefits of proper inheritance.

1155


If you don’t declare a return value, what type of return value is assumed?

963


What are manipulators used for?

1101


Evaulate: 22%5 a) 2 b) 4 c) 0

1096


Which c++ compiler is best?

1162


What does new do in c++?

1077


Can we define a constructor as virtual in c++?

1132


What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?

1122


How does a copy constructor differs from an overloaded assignment operator?

1048


How to get the current position of the file pointer?

1049


What is c++ & why it is used?

1101


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

1061


Does c++ have string data type?

1112


Why is c++ still best?

986