1. One-dimensional array name function parameters
Using array names as function parameters, you should define arrays in the main and called functions, for example
<Span style = "font-size: 18px;"> void main () {void F (int B [10]); // void F (int B []) int A [10]; F (a) ;}</span>
In the called function, it is declared that the size of the parameter array is 10, but in reality, it does not have any effect to specify the size, because the C language compilation does not check the size of the parameter array, only the first element address of the real parameter array is passed to the form parameter array. You can leave an empty square brackets behind the defined array, as shown in. In addition, when using an array name as a function real parameter, instead of passing the value of the array element to the form parameter, the address of the first element of the real parameter array is passed to the form parameter array.
Ii. Multi-dimensional array name function parameters
The multi-dimensional array name can be used as the real parameters and form parameters of the function. when defining the form parameter array in the called function, the size of each dimension can be specified, or the size of the first dimension can be omitted. For example, the description of int array [3] [10] Or int array [] [10] cannot be omitted, int array [] [] is invalid. If the size of the second dimension is the same, when the form parameter array and the real parameter group are different in the first dimension, the form parameter array and the real parameter group are composed of one-dimensional arrays of the same size, C language compilation does not check the size of the first dimension.