So I decided to experiment, completely out of randomness. And I found this:
"Hello World"[1]
Actually working on a first view, resulting in 'e'
even though:
Is this actually allowed, confronting the "standards" with guaranteed well-defined behavior ?
This is semantically correct. "Hello World"[1]
is equivalent to *("Hello World" + 1)
. In this expression the string "Hello World"
will be converted to pointer to its first element. Therefore, ("Hello World" + 1)
is the address of second element of string "Hello World"
.