C/C++ array variable in function header
arrays, c, c++, function, variables
Solution
For any (non-reference) type `T`, the function signatures `R foo(T t[])` and `R foo(T t[123])` (or any other number) are identical to `R foo(T * t)`, and arrays are passed by passing the address of the first element.
Note that `T` may itself be an array type, such as `T = U[10]`.
Problem
We can pass an array as a variable in a C/C++ function header, as in ``` int func(int arr[]) { ... } ``` I'm wondering: Is it ever possible that something goes inside the `[]` in a variable that's passed into the function header, or is it always empty?