Can we pass a matrix as an argument to a function.. means can we have the function declaration like this.. int matrix(int a[j]) { } then how can we call this function....
You an pass an array as an argument, but not like that. The lowest dimension is the only dimension that may indicated by [], all others must have a constant expression. Furthermore, you are not passing an array, but a pointer to an array. Consequently, you should pass in some size information or expect bounds violations.
Code: int matrixDisplay (int a[3][], unsigned size) { .... } int main () { myMatrix [4][12] = {....whatever}; .... matrixDisplay (myMatrix [4][], 48); .... }