Question: C++ Write a recursive function that returns true if an input string is a palindrome and false if it is not. You can do this
Write a recursive function that returns true if an input string is a palindrome and false if it is not. You can do this by checking if the first character equals the last character, and if so, make a recursive call with the input string minus the first and the last characters. You will have to define a suitable stopping condition. Test your function with several palindromes and non-palindromes. You may ask the user to input the string to test if it is a palindrome. Note: A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward as forward, such as madam
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
