1. Write a C++ program that can recognize if a given string of characters s of l
ID: 3641402 • Letter: 1
Question
1. Write a C++ program that can recognize if a given string of characters s of length n is a palindrome or not. You should write three functions in addition to the main function. The main function should call an integer function named InputString that reads the input characters of length n and returns the length of the string read. Use a global array for the string s of size m > n. n is local variable which will change depending on the size of the input string by the user. Once the string is entered, check to see if the string length is greater than zero. For a non zero string length, call another Boolean function named PalindromeTest to test if the string is a palindrome, which returns TRUE if the string is a palindrome, FALSE otherwise. Call another function PrintMessage upon return from PalindromeTest to display the result of the test. PrintExplanation / Answer
#include #include using namespace std; //Use a global array for the string s of size m > not sure what this means, sorry char arr[100]; int inputString() { string ans; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.