I need help programming this program in C.
1.) Write a program that reads a message, then checks whether it's a palindrome (the letters in the message are the same from left to right as from right to left), example is shown below:
Enter a message: He lived as a devil, eh?
Palindrome
Enter a message: Madam, I am Adam.
Not a Palindrome
2.) Ignore all characters that aren't letters. Use integer variables to keep track of positions in the array.
3.) It must include and implement the following function prototypes:
4.) The main() of this program will call get_msg() to obtain only the alphabet characters of the entered message and the total number of alphabet characters of the message. These two data are returned by get_msg() via its two parameters. Here 'alphabet characters' include both upper and lower case of 26 letters only.
5.) This program defines a macro MAX_MSG_LEN with a value of 80, which is used to limit the total alphabet characters that can be saved in an array.
6.) The main() will pass both data received from get_msg() to palindrome(), which returns either true or false, depending on if the array contents is a palindrome. Based on this return, main() prints a simple message, 'Palindrome' or 'Not a palindrome', as shown above.
7.) Please follow all directions.
Here is the solution to above problem in C. Please read the code comments for more information
C CODE
#include <stdio.h>
#include<string.h>
#include<ctype.h>
#define MAX_MSG_LEN 80
void get_msg(char msg [], int * len)
{
int i=0;
char c;
do
{
c=getchar();
//checking if alpha
if(isalpha(c))
{
//converting to lower to ignore case sensitivity
msg[i++]= tolower(c);
}
}while(c!='\n');
msg[i]='\0';
*len =i;
}
//to check palindrome
bool palindrome(char msg[],int * len)
{
int start=0;
int end=*len-1;
int i=0;
//comparing start to end
while(start<=end)
{
//if not matching send false;
if(msg[start]!=msg[end])
return false;
start++;
end--;
}
return true;
}
int main()
{
char msg[MAX_MSG_LEN];
int len=0;
printf("Enter a message: ");
get_msg(msg,&len);
if(palindrome(msg,&len))
printf("Palindrome\n");
else
printf("Not a Palindrome\n");
return 0;
}
SCREENSHOT OF OUTPUT

I need help programming this program in C. 1.) Write a program that reads a message,...