Array knowledge points in Linux C notes, linux Array
1. One-dimensional array, two-dimensional array, character array.
2. When an array is passed as a parameter to a function, the size of the array cannot be obtained through sizeof. When an array is used as a function parameter, you cannot pass the array parameter itself to tell the function the size of the array when running the program, because the array parameter of the function is equivalent to a pointer pointing to the first element of the array. The efficiency of passing an array to a function is very high, which means that the programmer must use some mechanism to tell the parameter size of the Function Array.
3. The two methods tell the function array parameter size: Pass the array and the value indicating the array size to the function together; introduce a rule to end an array.
4. array_name is the pointer to the first element in the array, and & array_name is the pointer to the entire array. An array is a type. It has three elements: basic type (the type of an array element) and size (except when the array is described as incomplete), the value of the array (the value of the entire array ).