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
What is singleton pattern in c++?
Show the declaration for a pointer to function returning long and taking an integer parameter.
How come you find out if a linked-list is a cycle or not?
What is anonymous object in c++?
What is the full form of stl in c++?
What are stacks? Give an example where they are useful.
which operator is used for performing an exponential operation a) > b) ^ c) none
What are the various access specifiers in c++?
What are the main features of c++?
What is the rule of three?
What is a c++ map?
Is c++ pass by reference or value?
Is it possible to have a recursive inline function in c++?
List the advantages of inheritance.
What is #include cmath?