`double a[4];` declares one array object containing four ordered subobjects of type `double`. Brackets after the identifier specify the number of elements; `a[0]` names the first element and can be used as a `double` object. Indices for this array run from 0 to 3. section 6.1.1 section 2.2
Reading nested declarations
`double C[M][N];` declares `M` elements, each an array of `N` doubles. Read the declaration from the identifier outward: `C[0]` is an array, while `C[0][0]` is a `double` object. An array’s element type can itself be an array. section 6.1.1
TAKEAWAY: An array is an object, not a pointer or a value that can be manipulated wholesale.
- Arrays cannot be assigned to or compared, and arithmetic is not defined on arrays themselves. section 6.1.2
- An array used as a condition evaluates to true because of array decay; this does not make the array a pointer object. section 6.1.2 section 6.1
- Designated initializers use brackets to select positions when initializing elements. section 6.1.1
Pointers and arrays meet at function interfaces: C rewrites array parameters as pointer parameters, and both forms support bracket notation for element access. Pointer addition can then visit successive elements. Keep the distinction: a pointer does not retain an array object’s length, so a function processing elements through a pointer needs the length supplied separately. section 11.3 section 11.1.2
double A[7] = { 0, 1, 2, 3, 4, 5, 6, };
double s0_7 = sum0(7, &A[0]); // For the whole
double s1_6 = sum0(6, &A[1]); // For the last 6
double s2_3 = sum0(3, &A[2]); // For the 3 in the middle
These calls pass an element’s address and an explicit count to process the whole array or a selected portion of it. section 11.1.2







































