If you have a function that takes the pointer of an array, would there be any use in using pointers to each element in the array, or is it redundant? For example:
int sum(int(*arr)[3]) {
int i,j, sum = 0;
for (i =0; i < ROW ; i ++) {
for (j =0; j < COL ; j ++) {
sum = sum + *(*( arr +i )+j);
}
}
}
Would using arr[i][j] be the same in this case?