Hello,
are all the ways to access a member of a two-dimensional array listed below correct? I've tested the code and it seems to work properly.
Code:void do_something(int (*ap)[COLUMNS], int rows, int columns) { int x, i, j; ... // assume we've assigned some values to i and j here x = (*(ap+i))[j]); x = *(&ap[0][0] + i * columns +j)); x = *(*(ap+i) + j)); x = ap[i][j]; }