This is a quesetion from Whizlabs.
I have no clue about the answer
(I even doubt if even one of the options is correct!)
Which code initializes the two-dimensional array tab so that tab
[3][2] is a valid element?
int[][] tab= { {0,0,0},{0,0,0}};
A. int tab[][] = { 0,0,0,0
0,0,0,0,
0,0,0,0,
0,0,0,0
};
B. int tab[][]=new tab[4][];
for (int i=0;int[3])
C.int tab[3][2];
D. int[] tab[]={ {0,0,0},{0,0,0},{0,0,0},{0,0,0}}
Can some help me understand Multidemnsional array and how i can see them in a pictorial form.
Like I know arr[3][4] would mean 3 rows and 4 colums, but what about arrays like arr[3][4][5] and how i would initializee them or know that hte initialisation is correct.