. myfunc.
myfunc "Hello World". , , null.
( , ). C ++ char * (.. const char * ). char *, . -, .
String literals in C and C ++ have a static storage duration. So no, they are not allocated "on the stack." They are always allocated in static memory, which means that they live forever - while your program is running.
PS In order to answer your question in more detail, you must explain why on Earth you expect your pointer to remain blank.
PPS int main, not void main.
source
share