I’m stuck on a C Programming question and need an explanation.
Which of the following for loops actually prints out all additional command line arguments except for the executable name? Assume the for loop’s counting variable is already declared.
for( i = 1; i <= argc; i++ ) { printf( “%dn”, argv[ i ] ); } |
||
for( i = 0; i < argc – 1; i++ ) { printf( “%dn”, argv[ i ] ); } |
||
for( i = 1; i < argc; i++ ) { printf( “%dn”, argv[ i ] ); } |
||
for( i = 0; i < argc; i++ ) { printf( “%dn”, argv[ i ] ); } |