Question: C++ Your task for this assignment is to create a C++ function that uses a stack to test a string of characters to see if
C++
Your task for this assignment is to create a C++ function that uses a stack to test a string of characters to see if the string is a palindrome.
You method should: accept a string as an input parameter for the function. put the characters in the string in sequence into an array-based stack of characters.
Remove the characters from the stack and put them into a new string of characters in the order in which they are retrieved from the stack.
Check to see if the input string and the new string are the same. If they are the same, the string is a palindrome, if they are not the same, then we do not have a palindrome.
Your software should return a string message telling us that the string is or is not a palindrome.
You should have a main() function for your software to test the palindrome checking function.
It should contain three string variables that you have initialized with data.
I should then call the palindrome checking function for each of these and show us the results.
Your main() function should then ask the user for input, check to see if the input is a palindrome, and then display the result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
