write program for palindrome
Answer Posted / darren chang
bool palind(string input)
{
int j=input.length()-1;
int i=0;
while(i<j)
{
if(input[i]!=input[j])
return false;
i++;
j--;
}
return true;
}
| Is This Answer Correct ? | 23 Yes | 24 No |
Post New Answer View All Answers
What are compilers in c++?
What are c++ tokens?
What is pointer in c++ with example?
Why is "using namespace std;" considered bad practice?
How do pointers work?
How do c++ struct differs from the c++ class?
What is #include iostream h in c++?
What is recursion?
How the virtual functions maintain the call up?
What is a stack c++?
What is c++ and its uses?
Differentiate between a template class and class template in c++?
What is the difference between ++ count and count ++?
What is meant by forward referencing and when should it be used?
Please explain class & object in c++?