3 ms·
&a[3] is allowed, it's a one-past-the-end-of-the-array pointer. &a[4] would be UB (if it were evaluated). sizeof(a[3]) is not evaluating a[3], so it also isn't
by edflsafoiewq 6y ago
&a[3] is allowed, it's a one-past-the-end-of-the-array pointer. &a[4] would be UB (if it were evaluated).
sizeof(a[3]) is not evaluating a[3], so it also isn't UB.