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
Is ca high or low level language?
What language does google use?
Explain the pure virtual functions?
What programming language should I learn first?
What is setbase c++?
What does new in c++ do?
Why are pointers used?
What are the benefits of pointers?
Explain what data encapsulation is in c++?
Can notepad ++ run c++?
State two differences between C and C++.
What is difference between class and function?
What does std mean in c++?
Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c
Explain what are mutator methods in c++?