Two-dimensional array and pointer, two-dimensional array pointer
The C language has the following conclusions:
1. In an expression, the array name is the address of its first element.
Except for the following two cases:
(1) When the array name is used as the operand of the sizeof operator, sizeof returns the length of the entire array instead of the pointer length to the array.
(2) When the array name is used as the operand of the & operator, a pointer to the array is generated instead of a pointer to the pointer constant.
2. Add & before any variable to obtain the address of the variable.
Iii. Example:
If there is a two-dimensional array: a [x] [y], there are:
(1) a = & a [0]
(2) a [0] = & a [0] [0] = *
(3) & a = the starting address of the whole two-dimensional array
(4) a + 1 = & a [0] + 1 = & a [1]
(5) a [0] + 1 = & a [0] [0] + 1 = & a [0] [1]
(6) & a + 1 = end address of the Two-dimensional array