Why sequence does not start from index 3?
because, that's not how it works!!
Quoting C11
, chapter ยง6.7.9 for designated initializer (emphasis mine)
Each brace-enclosed initializer list has an associated current object. When no
designations are present, subobjects of the current object are initialized in order according
to the type of the current object: array elements in increasing subscript order, structure
members in declaration order, and the first named member of a union.148) . In contrast, a
designation causes the following initializer to begin initialization of the subobject
described by the designator. Initialization then continues forward in order, beginning
with the next subobject after that described by the designator.149)
Thus, in your case, after the designator [7]
, the remaining two elements in the brace enclosed list will be used to initialize the next sub-objects, array elements in index 8
and 9
.
Just to add a little more relevant info,
If a designator has the form
[ constant-expression ]
then the current object (defined below) shall have array type and the expression shall be
an integer constant expression. [...]