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
Describe about storage allocation and scope of global, extern, static, local and register variables?
Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?
Explain data encapsulation?
Explain how the virtual base class is different from the conventional base classes of the opps.
What is meant by the term name mangling in c++?
What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor
What is static function? Explain with an example
Is dev c++ free?
What do you know about near, far and huge pointer?
What is private public protected in c++?
What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard
What are static variables?
How can I learn c++ easily?
What is the difference between mutex and binary semaphore?
What is the use of function pointer?