Nope.
"White"
is an array of char[6]
in static memory somewhere. (or magic land, it's not specified, and is completely irrelevant). Note that it may or may not be the same static array as another "White"
elsewhere in the code.
char str[] = "White";
creates a new local char[6]
array on the stack, named str
, and copies the characters from the static array to the local array. There are no pointers involved whatsoever.
Note that this is just about the only case where an array can be copied. In most situations, arrays will not copy like this.
If you want a pointer to the magic static array, simply use const char* str = "White";
Phonetagger notes that if the line of code is not in a function, then str
is not on the stack, but also in the magic static memory, but the copy still (theoretically at least) happens just before execution begins of code in that translation unit.