Yes. 6.5.2.1 paragraph 1 (C99 standard) describes the arguments to the []
operator:
One of the expressions shall have type “pointer to object
type
“, the other expression shall have integer type, and the result has type “type
“.
6.5.2.1 paragraph 2 (emphasis added):
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 thatE1[E2]
is identical to(*((E1)+(E2)))
. Because of the conversion rules that
apply to the binary+
operator, ifE1
is an array object (equivalently, a pointer to the
initial element of an array object) andE2
is an integer,E1[E2]
designates theE2
-th
element ofE1
(counting from zero).
It says nothing requiring the order of the arguments to []
to be sane.