Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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