Question: *****please contain annotation. Thanks!! This exercise is from Ch12, Programming Project 2b, p275/276 Write a program called palindrome.c which has a function check_palindrome() . Your

 *****please contain annotation. Thanks!! This exercise is from Ch12, Programming Project2b, p275/276 Write a program called palindrome.c which has a function check_palindrome()

*****please contain annotation. Thanks!!

This exercise is from Ch12, Programming Project 2b, p275/276 Write a program called palindrome.c which has a function check_palindrome() . Your main function must read an input string from the user, then make a call to check_palindrome ) to confirm whether it's a palindrome (the letters in the message are the same from left to right as from right to left). If it is a palindrome, the function should return 1 ; if it is not a palindrome, it should return 0. Based on the return value of check_ palindrome ) , your main() function must print an appropriate output message. A user input string will have at most 100 characters. Iignore all characters that are not letters when checking for palindromes Your program MUST use pointers and NOT integer array indices (i.e., a[1], a[5] etc.) to process the character array. Examples: Enter a message: He lived as a devil, eh? Palindrome Enter a message: Madam, I am Adam. Not a palindrome You must also test your solution. Create a separate file called testcases.c which implements five test cases for your palindrome function. Each test should print the test input that you have defined and hardcoded for it to use, make a call to your palindrome function, and print the result based on the return from check_palindrome() (Test passed" or "Test failed"). Ensure that each of your testcases exercises a different equivalence class - an equivalence class is a certain grouping in the domain that you are examining (in this case, the input). For example, if you were creating equivalence classes of some integer input i for a function you were testing, you might define the following equivalence classes: MINIMUMINTEGER - . MINIMUM INTEGER

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!