![]() |
arguments to the function
Can we pass a matrix as an argument to a function..
means can we have the function declaration like this.. int matrix(int a[i][j]) { } then how can we call this function.... |
Re: arguments to the function
What made you think we cannot have something like that.
|
Re: arguments to the function
So then we cant pass an array as a argument means how to use an arrray in called function
|
Re: arguments to the 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.
|
Re: arguments to the function
Can u give me an example how to pass an array as the argument to the function
|
Re: arguments to the function
Code:
int matrixDisplay (int a[3][], unsigned size) |
| All times are GMT +5.5. The time now is 09:19. |