Home /
Expert Answers /
Computer Science /
in-c-program-please-5-2-lab-palindrome-a-palindrome-is-a-word-or-a-phrase-that-is-the-same-when-r-pa714
(Solved): IN C PROGRAM PLEASE!
5.2 LAB: Palindrome A palindrome is a word or a phrase that is the same when r ...
IN C PROGRAM PLEASE!
5.2 LAB: Palindrome A palindrome is a word or a phrase that is the same when read both forward and backward. Examples are: "bob," "sees," or "never odd or even" (ignoring spaces). Write a program whose input is a word or phrase, and that outputs whether the input is a palindrome. You may assume that the input string will not exceed 50 characters. Ex: If the input is bob, the output is: palindrome: bob. Ex: If the input is bobby, the output is: not a palindrome: bobby Hint: Start by just handling single-word input, and submit for grading. Once passing single-word test cases, extend the program to handle phrases. If the input is a phrase, remove or ignore spaces. 396190.2640062.qx3zqy7 LAB 5.2.1: LAB: Palindrome 1/10 ACTIVITY main.c Load default template... 24 break; 25 } 26 i++; 27 j--; 28 } 29 if (is_palindrome) { 30 31 32 } 33 else { printf("palindrome: %s\n", sentence);