The main function of C language usually contains argc and argv, which are written as follows:
int main(int argc,char *argv[])
int main(int argc,char **argv)
These two parameters are explained in detail as follows:
argc : Total number of arguments passed in from the command line
argv : *argv[] is an array of pointers, in which the stored pointers point to all command line parameters, argv [0] points to the global path of the program, argv [1] points to the first string after executing the program name in the DOS command line, and argv [2] points to the second string.
,
Question 3:
Explanation: All the options mentioned (./a.out, ./test, ./fun.out.out) are simply the command without any argument. A command is always stored as argument vector zero i.e., argv[0] always contain the command where as argv[1], argv[2], etc. contains the arguments to the commands, if any.