Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ make In a function called checkPalin, prompt the user to enter a number N and then accept N strings from the user. These

in c++ make

In a function called checkPalin, prompt the user to enter a number N and then accept N strings from the user. These strings will consists only of letters (both uppercase and lowercase), numbers and spaces.

You can either use an array of strings or process the strings one by one.

Check if the strings are palindromes (ignoring case and whitespace). If a string happens to be a palindrome, add it to the end of a result string.

After processing all the input, return the result string to main, where it is printed. (5 points)

Prompts are the only print statements allowed outside the main function. In other words,

you cannot print the palindrome strings in the checkPalin function.

The output should be printed in a single line, and the case of the letters in the input should be preserved. (5 points)

You need not check for any errors.

Please include comments wherever appropriate.

You have to use C++ string objects for this program.

(ex)

Enter the number of strings: 9 Enter the strings: Race Car Get to the choppa 
Mountain Dew BATMAN Taco Cat Stressed Desserts Is Mayonnaise an instrument swap paws 
A Toyotas a Toyota The palindromes are: Race Car Taco Cat Stressed Desserts swap paws A Toyotas a Toyota 

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

Recommended Textbook for

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions

Question

12-5 How will MIS help my career?

Answered: 1 week ago