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.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *