write program for palindrome
Answer Posted / amrutha
String s1=args[0];
String s2="";
for(int i=0; i<s1.length(); i++)
{
s2=s2+charAt(i);
}
if(s1.equals(s2))
System.out.println("Palindrome");
else
System.out.println("Not Palindrome");
| Is This Answer Correct ? | 168 Yes | 173 No |
Post New Answer View All Answers
What is & in c++ function?
What are the storage qualifiers?
What do you mean by persistent and non persistent objects?
What is a lambda function c++?
Define copy constructor.
What are features of c++?
Are strings immutable in c++?
What are the differences between new and malloc?
What is the type of 'this' pointer?
Can a Structure contain a Pointer to itself?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
What are manipulators used for?
What are the differences between the function prototype and the function defi-nition?
Describe the setting up of my member functions to avoid overriding by the derived class?
Write a program to add three numbers in C++ utilizing classes.