In C/C++, the main function receives parameters which are of type char*
.
int main(int argc, char* argv[]){
return 0;
}
argv
is an array of char*
, and points to strings. Where are these string located? Are they on the heap, stack, or somewhere else?
They are compiler magic, and implementation-dependent.