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
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
Ask to write virtual base class code?
what does the following statement mean? int (*a)[4]
Explain linear search.
Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort
How the programmer of a class should decide whether to declare member function or a friend function?
Is it possible to write a c++ template to check for a function's existence?
What is purpose of abstract class?
What is the precedence when there is a global variable and a local variable in the program with the same name?
What is a breakpoint?
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].
What is a literal in c++?
How does work in c++?
What is a far pointer? where we use it?
Write a program to show polymorphism in C++?