Explain the Command line argument.
Answers
Answered by
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
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
Hindi,
6 months ago
Social Sciences,
6 months ago
French,
6 months ago
Business Studies,
1 year ago
History,
1 year ago
Economy,
1 year ago