Essentailly, which compiled as if you wrote:
const static char helloworld[12] = {'h', 'e', 'l', 'l', 'o',' ','w', 'o', 'r', 'l', 'd', '\0'}; const char * str = helloworld;
An array is usually placed in some read-only memory section, probably next to the executable code.
Depending on where it is defined, str will be on the stack or global memory space.
source share