How can I pass a 2D array to a func without specifing the size of the array!!!
Say, I my size of array is not fixed and hence I cannot specify array[][4] in the declaration...so what is the solution?
#include <stdio.h>
void printArray(int array[ ][4]);
main() {
int array[3][4] = {0,1,2,3,4,5,6,7,8,9,10,11};
printArray(array);
return 0;
}
void printArray(int array[][4], int m, int n) {
int i, j;
for(i=0 ; i<3 ; i++) {
for(j=0 ; j<4 ; j++) {
printf("%2d ", array[i][j]);
}
printf("\n");
}
}