Question: Description (Needs to work with c++ and can't use classes or pointers thank you) The purpose of this challenge is to manually manipulate character arrays.

Description (Needs to work with c++ and can't use classes or pointers thank you)

The purpose of this challenge is to manually manipulate character arrays. This challenge validates if a given word is a palindrome.

Requirements

Write a program to determine if a string is a palindrome. A palindrome is a word that reads the same forwards as well as backwards. For example, madam

Create a function bool is_palindrome(char []). The function returns a boolean. This function performs a case-sensitive check. Madam is not a palindrome, but madam is. Do not use cout to display your result in this function.

Declare a char array to hold a maximum of 50 characters.

Ask the user to enter a string. Use cin.getline(char_variable, 50) function call to get the string from the user

Display a message indicating if the entered string is indeed a palindrome

Sample Interaction / Output

Enter a string: madam madam is a palindrome Enter a string: taco taco is not a palindrome 

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!