loop over multidimensional array c 2b 2b

Solutions on MaxInterview for loop over multidimensional array c 2b 2b by the best coders in the world

showing results for - "loop over multidimensional array c 2b 2b"
Lily-Rose
31 Sep 2016
1int arr[2][3] = {
2  {1,2,3}, 
3  {4,5,6}
4};
5for(int i=0 ; i<sizeof(arr) / sizeof(arr[0]) ; i++){
6	for(int j=0 ; j<sizeof(arr[i])/sizeof(arr[i][0]) ; j++){
7		cout<<"2D array have: "<< arr[i][j]<<endl;
8	}
9}