1. If the function parameter is a one-dimensional array, then we can pass a two-dimensional array of 1 rows-a one-dimensional array 2. A two-dimensional array can be used as a parameter to a function: if the parameter of the function is a two-dimensional array, the passed argument must also be a two-dimensional array of the same type 3. As with the same-dimensional array, when a two-dimensional array is an argument to a function, the function is also a pointer to the passed-in two-dimensional array, which is manipulated by a pointer to an incoming two-dimensional array 4. When a two-dimensional array is an argument to a function, the number of rows may not be written, but the number of columns must be 5. So, as with a one-dimensional array, when a two-dimensional array is a function parameter, the parameters of the function are the rows of the array, the two parameters of the column, the standard notation: void Test (int rows, int cols, int arr[][cols]) {} character array: 1. Default value problem for character array: Declares a character array, does not assign a value to the element of this character array, then the element of this character array is a value, the memory garbage value is 2. When you declare a character array, the other characters are initialized to ' 3 ' if some elements are initialized. Character array cannot be stored in Chinese; 4. If the length of the string array is less than or equal to the length of the string, there will be no storage condition 5. Therefore, when using character arrays to store string data, it is best not to specify a length of 6 when declaring. scanf ("%s", array); There is no need to bring & at this time, because the name of the array in this time itself can represent its first address 7. When inputting strings with scanf, it is unsafe if the input length is greater than the length of the array; If a space is entered, the input is considered to end 8. You cannot use sizeof to calculate the length of a string (it is possible that the actual string is only part of the array), using strlen (), and another method: The while loop, counting from the first, and encountering the end of a.
C-two-dimensional arrays as function arguments, character arrays