#include <stdio.h>
main(){
int A[][4] = {
{1, 2, 3, 4},
{5, 6, 7 ,8},
{9,10,11,12},
{13,14,15,16}
};
int *iter = &A[0];
printf("%d\n", *(iter + ( 4 * 2 ) + 2) );
iter = &A[2];
printf("%d\n", *(iter + 2));
}
int A[<2D digit>][<1D digit>];
When declaring an array, you must specify the size of the one-dimensional digit
Therefore, **A = {multidimensional array}; does not hold
In the example I have left, I left the two-dimensional space blank
It works when you do this, but the compiler doesn't specify a two-dimensional position
Spit out warning Of course, it works
Did you understand?
HYUN SUK's tag is only array and pointer, but there's no C tag Please tag c.
© 2024 OneMinuteCode. All rights reserved.