Doubt on passing arrays as parameters of functions

how can we pass the inputs taken in main functions to the parameters of function definition.like
void print(arr[ ][ col]); and we have taken row and col input in main function. How to pass it to function definition parameters.

@aryaman.kumar26,

int func(int arr[][100]) {
      int my_var;
     //do some work here
return my_var;
}

int main(){
      int n,m; cin>>n>>m;
      int arr[100][100];
      for(int i=1; i<=n; i++) for(int j=1; j<=m; j++) cin>>arr[i][j];
      int ans = func(arr);
      
      return 0;
}

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.