?
2010-12-03 23:05:31 UTC
I had a few questions on command line arguments:
1) What is the value of argc if the command line arguments to run your program are:
a.out input.dat output.dat and the main function header is the following:
int main( int argc, char * argv[ ] )
The answer is 3 but can someone explain to me why?
2) What is the value of argv[0] given the same command line argument and main function header as the
previous question?
The answer is "a.out", but can you explain why? I dont get it.
P.S. the 2nd question refers to the first
THanks