Question: In C++ With //comments (X Code preferred) Both part 1 and part 2 In separate header and implementation files (named palindrome.h and palindrome.cpp respectively), write

In C++ With //comments (X Code preferred) Both part 1 and part 2

In C++ With //comments (X Code preferred) Both part 1 and part2 In separate header and implementation files (named palindrome.h and palindrome.cpp respectively),write a function named isPalindrome() to test whether a character array (i.e.

In separate header and implementation files (named palindrome.h and palindrome.cpp respectively), write a function named isPalindrome() to test whether a character array (i.e. a string) is a palindrome or not. The function should Take a character array as input Return true if the string is a palindrome, false if it isn't. That means the function's return type should be bool . The following are some things to recall about working with character arrays to hold strings: char s[50] creates an array to hold 50 characters cin.getline (s, 50) will read a line of text from the console (with white space) into the char array s - * The entered string will automatically have the null character 10' appended to the end of the string, just after the last letter/symbolumber. So if the user typed in "hello", the first 6 elements of the char array s would hold: The following are some tips towards designing your solution You may need to know the length of the string. Recall you can find this by scanning the array for what position you find the null character in - A HW5 test file has been provided on Canvas. In it you'll see a function called palindromeTest) containing the following code, and called in main (). This code allows you to continually test different strings (up to 50 chars) for being palindromes. * char s[50]; for (s; cin.getline(s, 50);) cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!