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
What does the nocreate and noreplace flag ensure when they are used for opening a file?
Can class objects be passed as function arguments?
Can we change the basic meaning of an operator in c++?
Why are arrays usually processed with for loop?
What do you mean by volatile and mutable keywords used in c++?
What is c++ course?
What is the extraction operator and what does it do?
How do I get good at c++ programming?
what is upcasting in C++?
How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?
What does extern mean in a function declaration in c++?
an operation between an integer and real always yeilds a) integer result b) real result c) float result
What parameter does the constructor to an ofstream object take?
What is stack unwinding?
How can a called function determine the number of arguments that have been passed to it?