Command line arguments are accessed in a C program using the parameters ________ and ________ in the main function.
- argc, argv
- input, output
- param1, param2
- source, target
The correct answer is (a) argc, argv. In C, the main function can take two parameters: argc, which represents the number of command-line arguments, and argv, which is an array of strings containing those arguments.
Loading...
Related Quiz
- What is the significance of the size_t return type in the fwrite function?
- What is a pointer in C programming?
- A function in C returns a value to the calling function using the ________ keyword.
- What is the return type of the strlen function in C?
- You are working on an application that processes large datasets. How can using pointers and arrays together optimize the application?