3 ms·
This is still true, and it's mandated by the ISO C standard that a[i] is equivalent to (*((a)+(i))) (yes, they specify it with that many parentheses). You're st
by trealira 3y ago
This is still true, and it's mandated by the ISO C standard that a[i] is equivalent to (*((a)+(i))) (yes, they specify it with that many parentheses). You're still able to compile code that treats a[i] and i[a] interchangeably.
https://godbolt.org/z/37Kv44o1b https://godbolt.org/z/37Kv44o1b
> I had read this in some C book, maybe K&R or the Waite Group C Microsoft Bible.
I haven't read the Microsoft C Bible, but it does say this in K&R while explaining pointers.
- fuzztester 3y ago>This is still true, and it's mandated by the ISO C standard ... Wow, good to know. >but it does say this in K&R Then that must be where I had read it.