Check out example codes for "loop over multidimensional array c++". It will help you in understanding the concepts better.

Code Example 1

int arr[2][3] = {
  {1,2,3}, 
  {4,5,6}
};
for(int i=0 ; i<sizeof(arr) / sizeof(arr[0]) ; i++){
	for(int j=0 ; j<sizeof(arr[i])/sizeof(arr[i][0]) ; j++){
		cout<<"2D array have: "<< arr[i][j]<<endl;
	}
}

Learn ReactJs, React Native from akashmittal.com