0

Can explain how its working?

Somebody can me explain whats going on and how its working? void func (int *arr, int n1, int n2) { int i, j; for (i = 0; i < n1; i++) for (j = 0; j < n2; j++) printf ("%d\n", *(arr + i * n2 + j)); } int main (void) { int b[3][4] = { { 1, 2, 3, 4 }, { 5, 6, 7, 8}, { 9, 10, 11, 12 } }; func ((int*)b, 3, 4); return 0; }

29th Mar 2021, 6:41 AM
Karitoriki Nya
Karitoriki Nya - avatar
1 ответ