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 a hashmap c++?
Explain the isa and hasa class relationships. How would you implement each?
What is long in c++?
describe private access specifiers?
What is the first name of c++?
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).
Is c++ a dying language?
Which operator cannot overload?
Differentiate between an external iterator and an internal iterator?
What is the best c c++ compiler for windows?
Why are arrays usually processed with for loop?
Which bit wise operator is suitable for turning off a particular bit in a number?
Is c++ a software?
What is the use of dot in c++?
What is c++ mutable?