3 ms·
From the C11 spec quoted in the article > If both the pointer operand and the result point to elements of the same array object, or one past the last element o
by ChrisSD 8y ago
From the C11 spec quoted in the article
> If both the pointer operand and the result point to elements of the same array object, or one past the last element of the array object, the evaluation shall not produce an overflow; otherwise, the behavior is undefined.
So although most implementations might produce an address that's relative to b, that's not actually guaranteed by the spec unless it's `&b + 1`.
- JdeBP 8y ago... which it is in the program under discussion. Again, the address which has no guarantee relative to the address of b or the value of q is the address of a.