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
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
What are the two shift operators and what are their functions?
What is a terminating character in c++?
What is a flag in c++?
What are friend functions in C++?
What is a base class?
What is the difference between #import and #include in c++?
What does std mean in c++?
What is oops in c++?
Explain the term memory alignment?
Why should we use null or zero in a program?
Explain how a pointer to function can be declared in C++?
How can we access protected and private members of a class?
What are put and get pointers?