Question: Visual sudio 2017 task: HELP All user input for the Laboratory Tests are passed to your program via command line arguments, which you can access
Visual sudio 2017 task: HELP

All user input for the Laboratory Tests are passed to your program via command line arguments, which you can access using the 'argc' and 'argv variables. Both of these variables are defined as part of the main() function in your program. The argc variable is an integer and is assigned a value that corresponds to the number of arguments that are being passed to the program via the command line at 07/18 EEET2246 Engineering Computing 1 - Week 3 Laboratory Tasks runtime. Therefore, as a programmer you can determine the number of arguments being passed to your program by reading the value of the argc variable. Write a program using a 'cout' statement that displays the value of argc when you run your program with more than 1 command line argument. Demonstrate that when you pass 1, 2 or 3 arguments to your program via the command line, that your program displays the correct number of arguments to the console. The value of argc should be 2, 3 or 4 when 1, 2 or 3 arguments are passed to your program, respectively
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
