Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will write a program that uses a recursive function to determine whether a string is a character-unit palindrome. Moreover, flags can be used to

You will write a program that uses a recursive function to determine whether a string is a character-unit palindrome. Moreover, flags can be used to indicate whether to do case sensitive comparisons and whether to ignore spaces. For example "A nut for a jar of tuna" is a palindrome if spaces are ignored and not otherwise. "Step on no pets" is a palindrome whether spaces are ignored or not, but is not a palindrome if it is case sensitive since the S and s are not the same.

Palindromes are character sequences that read the same forward or backwards (e.g. the strings "mom" or "123 454 321"). Punctuation and spaces are frequently ignored so that phrases like "Dog, as a devil deified, lived as a god." are palindromes. Conversely, even if spaces are not ignored phrases like "Rats live on no evil star" are still palindromes.

  1. Create a flowchart or use pseudocode to indicate how the recursion will determine if a given string is a palindrome. Dont forget the rules for creating a good recursive function.

  2. Create a flowchart or use pseudocode to indicate how to get values from the list of command line parameters and determine whether you have a flag and dealing with those as well.

  3. Write in C++

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions