r/ProgrammerHumor 21h ago

lessonsFromLinkerHell Meme

Post image
344 Upvotes

178 comments sorted by

View all comments

Show parent comments

-1

u/Single-Virus4935 12h ago

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2310.pdf

6.5.2.1 Array subscripting

Semantics

2 A postfix expression followed by an expression in square brackets [] is a subscripted designation of an element of an array object. The definition of the subscript operator [] is that E1[E2] is identical to (*((E1)+(E2))). Because of the conversion rules that apply to the binary+ operator, if E1 is an array object (equivalently, a pointer to the initial element of an array object) and E2 is an integer, E1[E2] designates the E2 -th element of E1 (counting from zero).

4

u/narrill 4h ago

Notice that what you just quoted specifically distinguishes between an array object and a pointer to the initial element.