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
Comment on c++ standard exceptions?
What does flush do?
What is istream and ostream in c++?
What is the rule of three?
Are strings immutable in c++?
Explain the static storage classes in c++.
What is called array?
What is namespace std; and what is consists of?
What is c++ and its features?
What is the meaning of c++?
Define the operators that can be used with a pointer.
Can member functions be private?
Is c++ still in demand?
Why do we need pointers?
How is new() different from malloc()?