Array parameter
An array parameter is a C function parameter declared with array syntax that is adjusted to a pointer to its element type.
Modern C, Third Edition
An array parameter is a function parameter declared with array notation whose array-bound information is adjusted or lost when used in a function definition or call.
- How it is used
- Uses array notation to specify function interfaces that operate directly on caller-provided arrays.
- How deep it goes
- Explains pointer rewriting and multidimensional bounds, but defers the underlying mechanism until pointers are introduced.
- Examples
- Demonstrates element swapping, array copying, matrix multiplication, equivalent pointer declarations, and incompatible pointer-to-pointer matrices.
- What you can do after
- Apply it via C function interfaces that access one-dimensional or multidimensional arrays without expecting array-value copying.
Modern C
An array parameter is a function parameter declared with array syntax whose array type is adjusted for parameter passing and whose argument is passed as a pointer to the array's first element.
- How it is used
- Explains how functions receive arrays while preserving readable indexing and direct access to caller-owned elements.
- How deep it goes
- Defines pointer rewriting, lost innermost dimensions, and multidimensional equivalence, but defers broader pointer mechanics.
- Examples
- Uses an element-swapping function, string-function pointer declarations, array copying, and matrix multiplication.
- What you can do after
- Apply it by declaring array-shaped interfaces, choosing equivalent pointer notation, and handling multidimensional parameters correctly.
Related concepts
- referenceequivalent to · A reference is an indirect value or relationship that identifies or provides access to another value, object, resource, or source.
- sizeof operatorcontrasts with · The sizeof operator is a C and C++ unary operator that yields the size of a type or expression in bytes.
- call by valuecontrasts with · Call by value is a parameter-passing semantics in which a called operation receives its own copy of an argument’s value.
- functionpart of · A function is a callable program unit that performs an operation, may accept inputs, and can produce a result or side effect.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

