if( strcmp(s1.p,s2.p) == 0 )
printf("Entered string is a palindrome.\n");
else
printf("Entered string is not a palindrome.\n");
}
void show (const string1 s)
{
cout<<s.p;
}
int main()
{ int op;
char a[20];
cout <<"\nenter 1st string";
cin.getline ( a, 20 );
cout <<"\n\n";
cout<< a;
string1 s1(&a[0]);
char b[20];
cout<<"\nenter 2st string(for no data give -1)\n";
cin.getline ( b, 20 );
string1 s2(&b[0]);
do{
cout<<"\nMENU\n"
<<"1.Check equality in length\n"
<<"2.Copy string\n"
<<"3.Concate string\n"
<<"4.To reverse a string\n"
<<"5.Check for palindrome\n"
<<"6.Quit\n";
cin>>op;
switch(op)
{
case 1:
if(s1==s2)
{
cout<<"Both are equal";
}
else {cout<<"Both are not equal";}
break;
case 2: s2=s1 ;
show (s2);
break;
case 3: string1 t=s1+s2;
show (t);
break;
case 4:
cout<<"\n";
>>s1;
break;
case 5: !s1;
break;
}
}
while(op!=6);