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 do you mean by ‘void’ return type?
What is c++ good for?
What is nested class in c++?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
Is atoi safe?
What it is and how it might be called (2 methods).
How do you declare a set in c++?
Do you need a main function in c++?
Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes
Is java as fast as c++?
What are structs in c++?
Is sorted c++?
Explain one-definition rule (odr).
What is a wchar_t in c++?
Explain what is oop?