Question: 1. Problem A Arrays and Strings (cont.) 1.1 Specification Write an ANSI-C program that reads inputs line by line, and determines whether each line of

1. Problem A Arrays and Strings (cont.) 1.1 Specification Write an ANSI-C program that reads inputs line by line, and determines whether each line of input forms a palindrome. A palindrome is a word, phrase, or sequence that reads the same backward as forward, e.g., "madam", "dad". 1.2 Implementation name your program lab3panlindrom.c assume that each line of input contains no space, and contains at most 30 characters define a function int isPalindrome (char []) which determines whether the input array (string) is a palindrome. for each input word, first prints it backward, and then determines if it is a palindrome, as shown in the sample output below. keep on reading until a word quit is read in. You can use the isQuit() function you implemented in lab2, but you are also encouraged to explore the string library function strcmp(). You can issue man strcmp to view the manual. Note that this function returns 0 (false) if the two argument strings are equal. This is the only string library function you should use. Dont use other string library functions such as strlen, strcpy. [bonus] You are encouraged not to use an extra array. Just manipulate the original array

1.3 Sample Inputs/Outputs: red 477 % a.out

hello

olleh

Is not a palindrome

thisisgood doogsisiht

Is not a palindrome

lisaxxasil

lisaxxasil Is a palindrome

dad

dad Is 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!