I have know idea what my teacher wants on this....... Consider the following fun
ID: 3621702 • Letter: I
Question
I have know idea what my teacher wants on this.......Consider the following function code that recursively determines whether the given string is a palindrome. There is an error in the recursive case. Correct that, and complete the program (with the main function). Make sure you test it.
isPalindrome(string str)static int count =0;" Comparing "<<str;(str.length()<=1)
return
true;
else
{
count++;
return
}
}
((str.at(count-1)==str.at(str.length()-count))&& isPalindrome(str.substr(count,(str.length()-count))));
{
cout<<
if
bool
Explanation / Answer
Dear, Here is the code //header filrsection #include #include using namespace std; bool Palindrome(int first, int last, char inputString[]); int main() { int first = 0;// first index for array int last = 0;// last index for array char inputString[100];//initialize size of array coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.