0
Why use argc and argv ??
3 ответов
0
tq
0
argc4
argv[0]gcc
argv[1]-o
argv[2]myprog
argv[3]myprog.c
As you can see, the first argument (argv[0]) is the name by which the program was called, in this case gcc. Thus, there will always be at least one argument to a program, and argc will always be at least 1.