It depends on the OS and possibly the language. A good C-oriented answer is that the OS creates a process space (including code loading, heap and stack creation, etc.). He then puts the vector of the command line arguments at the location, and then copies the address of the argument vector to βargvβ on the stack and the number of words to βargcβ.
Only after performing these tasks does the OS allow the process to complete.
source share