Question: Character arrays, C-style strings, and functions with array inputs A palindrome is a word, number, or other sequence of characters which reads the same backward

 Character arrays, C-style strings, and functions with array inputs A palindrome

Character arrays, C-style strings, and functions with array inputs A palindrome is a word, number, or other sequence of characters which reads the same backward and forward. The following are all examples of palindromes 12321, 725527, noon, civic, radar, level, rotor, kayak, reviver, racecar, redder, madam, and refer Part I) 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 \0' 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: th 1' 1' 0

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!