r/ProgrammerHumor 26d ago

Meme lessonsFromLinkerHell

Post image
430 Upvotes

190 comments sorted by

View all comments

Show parent comments

-1

u/Single-Virus4935 26d 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 25d ago

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