Multiple choice technology programming languages

In the following declaration of main, "int main(int argc, char *argv[])", to what does argv[0] usually correspond?

  1. The first argument passed into the program

  2. You can't define main like that

  3. The program name

  4. Null value

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In C and C++, the argv array contains command-line arguments, where argv[0] is conventionally the path or name of the program being executed. Subsequent indices hold the actual arguments passed.