Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a C program according to the description of Programming Projects Q 2 ( b ) of Chapter 1 2 , on pages 2 7
Write a C program according to the description of Programming Projects Qb of
Chapter on pages of the textbook.
Requirements:
The maximum length of the user message is characters.
You can only use the operator to declare the array. The operator should not be used anywhere else in your program.
Ignore all characters that arent letters.
When asked Do you want to continue N to stop the program stops if the
users input contains n or N
Example Interaction user input is underlined; your program must follow this format
precisely without the underline:
$ gcc Wall apalindrome.c
$ aout
Enter a message:
Hello?
Not a palindrome
Do you want to continue N to stop n
$
$ aout
Enter a message: d
Palindrome
Do you want to continue N to stop
z
Enter a message: m
Palindrome
Do you want to continue N to stop
aab
Enter a message: zz
Palindrome
Do you want to continue N to stop y
Enter a message: xy
Not a palindrome
Do you want to continue N to stop
xy
Enter a message: aba
Palindrome
Do you want to continue N to stop
N
$
$ aout
Enter a message: level
Palindrome
Do you want to continue N to stop a
Enter a message: abba
Palindrome
Do you want to continue N to stop n
$
$ aout
Enter a message: abc
Not a palindrome
Do you want to continue N to stop
y
Enter a message: abcba
Palindrome
Do you want to continue N to stop
a
Enter a message: abceba
Not a palindrome
Do you want to continue N to stop
b
Enter a message: abba
Palindrome
Do you want to continue N to stop
and
$
$ aout
Enter a message: He lived as a devil, eh
Palindrome
Do you want to continue N to stop
a
Enter a message: Madam, I am Adam.
Not a palindrome
Do you want to continue N to stop
an
$
$ aout
Enter a message: Go ahead, make my day.
Not a palindrome
Do you want to continue N to stop y
Enter a message: Racecar!
Palindrome
Do you want to continue N to stop y
Enter a message: A man, a plan, a canal, Panama!
Palindrome
Do you want to continue N to stop
N
$
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started