Business Studies, asked by vijayna722, 1 year ago

Explain the Command line argument.

Answers

Answered by shivanshusingh97
0

Command Line Argument in C. Command line argument is a parameter supplied to the program when it is invoked. ... Here argc counts the number of arguments on the command line and argv[ ] is a pointer array which holds pointers of type char which points to the arguments passed to the program.

Answered by Shamsessa123
1

Answer:

Properties of Command Line Arguments:

i) They are passed to the main() function.

ii) They are parameters/arguments supplied to the program when it is invoked.

iii) They are used to control programs from outside instead of hard coding those values inside the code.

iv) argv[argc] is a NULL pointer.

v) argv[0] holds the name of the program.

Explanation:

Similar questions