void swap_double(double a[static 2]) declares an array parameter, but C adjusts that parameter to a pointer for the function interface. The call receives access to the original array rather than a copied array. section 6.1.4 section 11.3.2
Keep these rules distinct:
- The innermost array dimension is lost, so do not use sizeof on an array parameter to determine its array size. section 6.1.4
- Any array parameter rewrites to a pointer; array notation and equivalent pointer notation describe the same function interface. section 11.3.2
- For multidimensional arrays, only the innermost dimension is rewritten; the remaining dimensions stay part of the pointed-to array type. section 11.3.2
Changing the caller's array
double A[2] = { 1.0, 2.0 }; swap_double(A); printf("A[0] = %g, A[1] = %g\n", A[0], A[1]); The function exchanges A[0] and A[1]. It operates through the adjusted pointer, so no array copy is involved.

