Pass multiple-dimensional array to a function in C
问题 I have a function like this: void myfunc(int** arr, int n) { int i, j; for(i=0; i<n; ++i) { for(j=0; j<n; ++j) { printf("%d,", *(arr + i*n + j) ); // Print numbers with commas } printf("\n"); // Just breakline } } in other function I have an two-dimensional array like this: int main() { int seqs[8][8] = { {0, 32, 36, 52, 48, 16, 20, 4}, {0, 16, 20, 52, 48, 32, 36, 4}, {0, 32, 36, 44, 40, 8, 12, 4}, {0, 8, 12, 44, 40, 32, 36, 4}, {0, 32, 36, 38, 34, 2, 6, 4}, {0, 2, 6, 38, 34, 32, 36, 4}, {0,