In a structure, is it legal to use one array field to access another one? – stackoverflow.com

As an example, consider the following structure: struct S { int a[4]; int b[4]; } s; Would it be legal to write s.a[6] and expect it to be equal to s.b[2]? Personally, I feel that it must be UB ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "In a structure, is it legal to use one array field to access another one? – stackoverflow.com"