Question: A palindrome is a string that reads the same both forward and backward, for example, the string kayak is a palindrome. Write a program that

A palindrome is a string that reads the same both forward and backward, for example, the string "kayak" is a palindrome. Write a program that uses a recursive function to check whether a string is a palindrome. Your program must contain a value-returning recursive function that returns true if the string is palindrome and false otherwise. Do not use any global variables; use the appropriate parameters.
Hint: Some string functions that you can use from header file.
str.at(idx) Returns the character at index idx of string str.
tolower(chr) Converts chr to lowercase character.
str.length() Returns length of string str.
getline(cin, str) Allows user to input the value of str. Getline function reads spaces as well.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!