In most (all?) Unix-based operating systems, they are already an array. It's how operating system executes a process there — when a process starts, there is already an array of arguments ready for it.
The code that turns command line into an array lives in a shell (like bash) or any other program that starts another program. bash
has it's sources available, other programs — it's different.
In Windows, they are one string (which you can get unmodified using GetCommandLine()
API call), which is parsed by C runtime library to turn it into an array, because the language specification requires them to come as an array.
For programs compiled with Visual C++, the code that does this is included into Visual Studio distributions. You may have to turn on a checkbox that says something like “Include C runtime library source” in installer in order to have it installed.