passing multidimentional array pointers in c 2b 2b to functions

Solutions on MaxInterview for passing multidimentional array pointers in c 2b 2b to functions by the best coders in the world

showing results for - "passing multidimentional array pointers in c 2b 2b to functions"
Max
20 Mar 2017
1#include<iostream>
2using namespace std;
3
4void processArr(int a[][2]) {
5   cout << "element at index 1,1 is " << a[1][1];
6}
7int main() {
8   int arr[2][2];
9   arr[0][0] = 0;
10   arr[0][1] = 1;
11   arr[1][0] = 2;
12   arr[1][1] = 3;
13
14   processArr(arr);
15   return 0;
16}
similar questions