Question: * * * CODE IN C * * * * Define an input to be valid if all of following conditions hold: All alphabetic letters

***CODE IN C****
Define an input to be valid if all of following conditions hold:
All alphabetic letters are lower case, like c programming!,
Non alphabetic letters can only be digits, white space, exclamation point, question mark, or period.
Write a program that prompts the user to enter input. The program determines if the input is a valid or invalid.
Use getchar() function to read in the input. Do not use scanf.
Arrays are not allowed to solve this problem.
The user input ends with the user pressing the enter key (a new line character).
Character handling library functions in ctype.h are allowed.
Example #1
Enter input: spring_24
invalid
Example #2
Enter input: 8 little pigs!
valid
Example #3
Enter input: Computer science?
invalid
Example #4
Enter input: the obstacle is the way.
valid

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!