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

What are advantages of c++?

567


Why do we need c++?

599


Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

565


What is a v-table?

651


What is lambda in c++?

582






What is new in c++?

582


What operator is used to access a struct through a pointer a) >> b) -> c) *

598


describe private access specifiers?

647


How does com provide language transparency?

609


Explain the auto storage classes in c++.

608


What are compilers in c++?

616


can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is somewhere #include #include #include using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<

1645


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

1511


Explain the differences between private, public and protected and give examples.

574


Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort

641