Possible Duplicate:
Is a string literal in c++ created in static memory?
C++ string literal data type storage
In this code:
const char * str = "hello world";
If I understand correctly a pointer is 4 or 8 bytes, which I guess would be allocated on the stack.
But where is the memory for the "hello world" allocated and stored?
Or what does str
point to exactly?