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
declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
Define anonymous class.
What's the hardest coding language?
What is difference between c++ and c ++ 14?
How do you flush a buffer in c++?
List the advantages of inheritance.
How to declare a pointer to an array of integers?
What is the use of endl in c++?
what is oops and list its features in c++?
What flag means?
Describe the process of creation and destruction of a derived class object?
Why do we need function?
What is the best way to declare and define global variables?
What is a block in c++?