write program for palindrome
Answer Posted / shah
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
void main()
{
clrscr();
char str[30],str1[30];
cout<<"ENTER THE WORD:";
gets(str);
strcpy(str1,str);
strrev(str);
if(strcmp(str,str1)==0)
cout<<"THE WORD IS PALINDROME";
else
cout<<"THE WORD IS NOT PALINDROME";
getch();
}
| Is This Answer Correct ? | 24 Yes | 18 No |
Post New Answer View All Answers
What are the restrictions apply to constructors and destructors?
In c++, what is the difference between method overloading and method overriding?
Difference between delete and free.
what is the use of void main() in C++ language?
What is const pointer and const reference?
In what situations do you have to use initialization list rather than assignment in constructors?
How delete [] is different from delete?
What are inline functions? What is the syntax for defining an inline function?
Why is it necessary to use a reference in the argument to the copy constructor?
What is conditions when using boolean operators?
Explain public, protected, private in c++?
Comment on assignment operator in c++.
Explain the extern storage classes in c++.
What is polymorphism in c++? Explain with an example?
How would you implement a substr() function that extracts a sub string from a given string?