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 advantages of using friend classes?
What is virtual base class?
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
What are c++ tokens?
What are the advantages of pointers?
What is data abstraction? How is it different from data encapsulation?
What is the difference between struct and class?
What is an html tag?
List the special characteristics of constructor.
Write a program to interchange 2 variables without using the third one.
Should the this pointer can be used in the constructor?
Why cout is used in c++?
How do you clear a map in c++?
What is virtual methods?
How many types of scopes are there in c++?