C Language help
argc and argv are used when you are starting a program from the command line, or want to pass some variables to the program. (Dates back a bit!)
argc contains the number of arguments and argv is an array of pointers to the arguments which are strings. EG: char *argv[];
The first argument is always the programs name.
For example, if you had a program called 'squareroot'. You could call it by:
squareroot 4
squareroot would have 2 in argc and two pointers, one to "squareroot" and one to "4"
and it would return 2, (we hope!)
That is why main is declared as
int main(int argc, char *argv[]);
the return value is used by the calling program to see if the called program was ok.
There is another command line argument that sets enviroment variables, but that is only used by the real geeks and hackers.