Question: Modify the C program so that input characters are command line arguments. #include #include int main ( ) { char ch; int valid = 1
Modify the C program so that input characters are command line arguments.
#include
#include
int main
char ch;
int valid ;
printfEnter input: ;
while ch getchar
scan input
if isalphach checks for capital
if islowerch checks for lowercase
valid ;
break;
else if isdigitch && ch && ch && ch && ch if anything else than invalid
valid ;
break;
Input characters are command line argument.
Character handling library functions in ctype.h are allowed.
The program should also check if the number of arguments on the command line is greater than including aout as one of the arguments If the number of arguments is not greater than the program should print "invalid number of arguments".
Follow the format of the examples below.
Examples your program must follow this format precisely
Example #
$ aout spring
invalid
Example #
$ aout little pigs!
valid
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
