A palindrome is any word, phrase, or sentence that reads the same forward and backward (ignore spaces and punctuation characters, upper case/lower case characters). Here are some well-known palindromes:

Able was I, ere I saw Elba

A man, a plan, a canal, Panama

Deserts, I stressed

Kayak

ABBA

Write two bool functions, one uses loop(s) and one uses recursion, to determine if a string argument is a palindrome. The functions should return true if the argument reads the same forward and backward. Demonstrate the functions in a program. Use a loop to ask for another input string to check until user decides to stop.

Following is a sample main() function to consider:

Sample Solution

This question has been answered.

Get Answer