Sun WorkShop Compiler C 5.0 User's Guide

(5.1.2.2.1) Semantics of arguments to main:


int main (int argc, char *argv[])
{
....
}

argc is the number of command-line arguments with which the program is invoked with. After any shell expansion, argc is always equal to at least 1, the name of the program.

argv is an array of pointers to the command-line arguments.