Question: You will be making a program that can take command like args. Using command line arguments, allow the program to do the following If the

You will be making a program that can take command like args.

Using command line arguments, allow the program to do the following

If the command is -i, print: Integer, and then print the integer after it.

If the command is -f print: float, and then print the float after it

if the command is -s print: string, and then print the string after it.

If the command is -h print: all the commands, and the syntax

If the command is something not listed, do the same as the -h command.

It doesn't matter the number or the order -- do all the commands that the person typed.

Example entries into the program:

prog.exe -i 3

prog.exe -f 3.14 -i 6

prog.exe -i 6 -f 3.8

prog.exe -h

You will be making a program that can take command like args.

Using command line arguments, allow the program to do the following

If the command is -i, print: Integer, and then print the integer after it.

If the command is -f print: float, and then print the float after it

if the command is -s print: string, and then print the string after it.

If the command is -h print: all the commands, and the syntax

If the command is something not listed, do the same as the -h command.

It doesn't matter the number or the order -- do all the commands that the person typed.

extra credit:

Is someone does a command, but it is not the right syntax -- show the correct syntax.

Example entries into the program:

prog.exe -i 3

prog.exe -f 3.14 -i 6

prog.exe -h

Word document please. c program on visualstdios 2017

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!