write program for palindrome
Answer Posted / pallavi attarde
#include<iostream.h>
#include<string.h>
int main()
{
char str[25],str1[25];
cout<<"Enter a string: ";
gets(str);
strcpy(str1,str);
strrev(str);
if(strcmp(str,str1)!=0)
{
cout<<"string is not palindrome";
}
else
{
cout<<"string is a palindrome";
}
cout<<endl;
| Is This Answer Correct ? | 596 Yes | 248 No |
Post New Answer View All Answers
Which format specifier is used for printing a pointer value?
What are the advantages of using friend classes?
Explain the isa and hasa class relationships.
What are special characters c++?
Why do we use structure in c++?
Define the process of error-handling in case of constructor failure?
What is the difference between while and do while loop?
Why iomanip is used in c++?
What are the benefits of operator overloading?
Why do you use the namespace feature?
Are vectors faster than arrays?
What are keywords in c++?
What are static member functions?
Explain how we implement exception handling in c++?
Can we sort map in c++?