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 a pointer with example?
Describe friend function & its advantages.
What things would you remember while making an interface?
What is the use of 'this' pointer?
What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?
What is the advantage of c++ over c?
What is the difference between a "copy constructor" and an "assignment operator" in C++?
Why is c++ a mid-level programming language?
How is new() different from malloc()?
What is c++ prototype?
Explain 'this' pointer and what would happen if a pointer is deleted twice?
Is map sorted c++?
What is a responder chain?
What is constant in c++ with example?
How to declare a function pointer?