I have a doubt @ the storage of command line arguments.
myprog.exe -cfgfile myconfig.cfg
commandline args are passed when process gets created so are they
It depends on the OS and possibly the language. A good C-centric answer is that the OS creates the process space (including loading the code, creating the heap and stack, etc). Then it puts the command line argument vector in a location, and then copies the address of the argument vector to 'argv' on the stack, and the count of words to 'argc'.
Only after these tasks are done does the OS allow the process to execute.