Nope... in this case 'names' is converted to a pointer and each element of the array is a pointer too...
To print a pointer, use %p, not %u.
More: There is no garantees where the compier will allocate the blocks of data, except for the individual string literals and the elements of array 'names' itself... In the example:
Code:
char *names[] = { "t", "th", "str" };
The blocks 't\0', 'th\0' and 'str\0' could be allocated out of sequence. In assembly, the compiler could choose to do something like this:
Code:
section .data
str.names0: db 't',0
i: dd 0
str.names1: db 't','h',0
names: dq str.names0, str.names1, str.names2
str.names2: db 's', 't', 'r', 0
Except for the fact that 'str.names0', 'str.names1' and str.names2' are allocated in a different segment (.rodata), but, disconsidering this detail, the choice, above is still valid.
PS: Ok... i (if no otimizations were enabled) and names would be allocated on stack, but you get my point, don't ya?