What is argc and argv 1 in C? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 9

What is argc and argv 1 in C?

C

23rd Apr 2019, 8:49 AM
B.L Sibanyoni
B.L Sibanyoni - avatar
3 Respostas
+ 10
It has to do with CMD args, if i recall correctly "argc" tells you the number of args and "argv" tells you the actual arg values. BTW: https://www.sololearn.com/discuss/162270/?ref=app
23rd Apr 2019, 8:58 AM
Maz
Maz - avatar
+ 8
The name of the variableĀ argcĀ stands for "argument count";Ā argcĀ contains the number ofĀ argumentsĀ passed to the program. The name of the variableargvĀ stands for "argument vector". A vector is a one-dimensional array, andargvĀ is a one-dimensional array of strings.
26th Apr 2019, 7:42 AM
B.L Sibanyoni
B.L Sibanyoni - avatar