Answers for "passing multidimentional array pointers in c++ to functions"

C++
0

passing multidimentional array pointers in c++ to functions

#include<iostream>
using namespace std;

void processArr(int a[][2]) {
   cout << "element at index 1,1 is " << a[1][1];
}
int main() {
   int arr[2][2];
   arr[0][0] = 0;
   arr[0][1] = 1;
   arr[1][0] = 2;
   arr[1][1] = 3;

   processArr(arr);
   return 0;
}
Posted by: Guest on May-02-2021

Code answers related to "passing multidimentional array pointers in c++ to functions"

Browse Popular Code Answers by Language