C Programming :: Command Line Arguments
-
The maximum combined length of the command-line arguments including the spaces between adjacent arguments is
-
If the different command line arguments are supplied at different times would the output of the following program change?
#include
int main(int argc, char **argv) { printf("%d\n", argv[argc]); return 0; } -
According to ANSI specifications which is the correct way of declaring main when it receives command-line arguments?
-
What do the 'c' and 'v' in argv stands for?
-
What will be the output of the program (sample.c) given below if it is executed from the command line?
cmd> sample "*.c"/* sample.c */ #include
int main(int argc, int *argv) { int i; for(i=1; i "%s\n", argv[i]); return 0; } -
What will be the output of the program (myprog.c) given below if it is executed from the command line?
cmd> myprog 10 20 30/* myprog.c */ #include
int main(int argc, char **argv) { int i; for(i=0; i "%s\n", argv[i]); return 0; }