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


Please Help Members By Posting Answers For Below Questions

Differentiate between realloc() and free().

580


Explain binary search.

557


Is c++ a difficult language?

558


Why was c++ created?

535


Which one is a preferred language C or C++? Why?

600






What is polymorphism and its type in c++?

572


How does code-bloating occur in c++?

728


What is a pointer with example?

646


Are php strings immutable?

544


What are the two types of polymorphism?

577


Is the declaration of a class its interface or its implementation?

686


What are virtual functions in c++?

667


Why is the function main() special?

611


What is friend class in c++ with example?

486


Why is c++ so fast?

519