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 protected inheritance?
What is virtual table?
When we use Abstract Class and when we use Interface?where we will implement in real time?
What are protected members in c++?
What is a .h file c++?
What is the use of register keyword with the variables?
Write some differences between an external iterator and an internal iterator?
What are the two main components of c++?
What is flag in computer?
Differentiate between the manipulator and setf( ) function?
Is turbo c++ free?
What is a memory leak c++?
Briefly describe a B+ tree. What is bulk loading in it?
What it is and how it might be called (2 methods).
Can we define function inside main in c++?