Passing 2d array as parameter to a function

how can we pass 2d array as parameter to a function

suppose ur 2d array is arr[100][100] ans say u call a function solve();
just write as solve(arr);

and for function
void solve(int arr[100][100]){

}

i hope it clears all ur doubts…

suppose we have array a, dimensions mxn, and we want to call solve(),

then how can we pass and accept parameters,

i explained it above na
int arr[n][m];
just write as solve(arr,n,m);

and for function
void solve(int arr[][], int n,int m){

}

pass variable n and m which represents dimensions of array

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.