eg.
int arr[2][3] = ...
Type arr[0]-
arr[0]
int (*)[3] // pointer to int[3], which is a pointer.
or
int[3] // an array whose size is 3, which is an array.
Google says nothing about the question.
I know that a pointer and an array are different types (derived types).
Perhaps C and C ++ treat it differently, I hope to see the standard wording.
arr[0]has a type int [3]that is not a pointer.
int [3]
int (*p)[3]has a type int(*)[3]indicating a pointer to an array of 3 elements.
int (*p)[3]
int(*)[3]
The pointer is not an array, and array is not a pointer.
, 2d- ( , ), , int (*)[3].
int (*)[3]
C 2d - , .
C
arr - , 3.
arr
3
arr[0] ( sizeof ..) , int*.
sizeof
int*
arr[0][0] int.
arr[0][0]
int
&arr[0].. , ? int(*)[3].
&arr[0]
Source: https://habr.com/ru/post/1691559/More articles:Как я могу лучше всего "параллелизовать" набор из четырех вложенных for() - циклов в атаке Brute-Force? - cGeolocation And Custom Google Maps API Token - javascriptCreating an Indexed Ordered Map - c ++Chart.js corner line - javascriptПреобразование столбца типа списка в длинную форму путем разделения элементов - splitOOP abstraction: multiple but fairly clear contexts? - inheritanceSingle line set for nearly redundant lists - pythonShell Scripting The ternary operator to get the result of a string - string/ usr / include is missing from NDK (r16b) - androidLog precision in python - pythonAll Articles