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
What is else if syntax?
Which compiler does turbo c++ use?
What are signs of manipulation?
Do you know what are pure virtual functions?
Can we declare a base-class destructor as virtual?
What is object in c++ wikipedia?
What is the difference between #import and #include?
Describe new operator?
What's the hardest coding language?
Describe the syntax of single inheritance in C++?
Is multimap sorted c++?
Do the names of parameters have to agree in the prototype, definition, and call to the function?
Explain the difference between struct and class in terms of access modifier.
How many characters are recognized by ANSI C++?
Explain the use of virtual destructor?