@l3st3r
It makes it possible to send arguments to the program through the command line. argc is the number of arguments. arg is an array containing the argc arguments stored as c strings. If argc > 0 then arg[0] will contain the name that was used to invoke the program.
Example:
If you run a program named g++ from the command line as g++ -o k main.cpp then argc and arg will contain the values:
argc = 4
arg[0] = "g++"
arg[1] = "-o"
arg[2] = "k"
arg[3] = "main.cpp"