Question: Write a C++ program that loops through all of the command line arguments that are passed to the program, beginning with the argument after the

Write a C++ program that loops through all of the command line arguments that are passed to the program, beginning with the argument after the program name. The first command line argument must be the string small, medium or large. We define small to mean size 5, medium to mean size 10, and large to mean size 20. If the first command line argument is missing, your program should print MISSING SIZE and stop. If the first command line argument is not the string small, medium or large, then your program should print the argument followed by a space and the message NOT A VALID SIZE, then should stop. For each command line argument after the first argument, your program should determine the length of the argument. If its length is greater than or equal to the size specified by the first command line argument, then the program should print the argument

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!