c++ Implement a recursive function that determines whether a string is a palindrome or not.   A word is a palindrome if the word looks the same when written backwards. For example. kayak → kayak, but not ball → llob. The function only needs to handle whole words. No special characters or spaces appear in the strings. You do not have to deal with case sensitivity.   You get a parameter from stdin: str the text string Input                   Expected output kayak                       1 boll                             0 naturrutan                    1

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 8SA
icon
Related questions
Question

c++

Implement a recursive function that determines whether a string is a palindrome or not.

 

A word is a palindrome if the word looks the same when written backwards. For example. kayak → kayak, but not ball → llob.

The function only needs to handle whole words. No special characters or spaces appear in the strings. You do not have to deal with case sensitivity.

 

You get a parameter from stdin:

str the text string

Input                   Expected output
kayak                       1
boll                             0
naturrutan                    1

Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Fibonacci algorithm
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning