

argc                        C Language                       argc




Argument passed to main()

int argc;

argc is an abbreviation for ``argument count''.  It is the tradi-
tional name for the first argument to a C program's main routine.
By convention,  it holds the number of  arguments that are passed
to main  in the argument vector argv.   Because argv[0] is always
the name of the command, the  value of argc is always one greater
than the number of command-line arguments that the user enters.

***** Example *****

For an example of how to use argc, see the entry for argv.

***** See Also *****

argv, C language, envp, main()






































COHERENT Lexicon                                           Page 1


