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 is the maximum value of a unsigned char a) 255 b) 256 c) 128
What are vtable and vptr?
What is pure virtual function? Or what is abstract class?
What is a pointer with example?
How many ways can a variable be initialized into in C++?
What is the best it certification?
How to defines the function in c++?
What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal
What is near, far and huge pointers? How many bytes are occupied by them?
What is low level language in simple words?
Explain about Virtual Function in C++?
Why do we use setw in c++?
Describe new operator and delete operator?
Explain one-definition rule (odr).
What is tellg () in c++?