Size of a 3D-Array

How may numbers can you store in an array My_Arr whose first value is stored at My_Arr[0][0][0] and last value at My_Arr[4][3][5] ?


The answer is 120.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Arulx Z
Dec 23, 2015

You can picture a 3 dimensional array as a cuboid containing elements of the array. Keeping in mind that the array is 0 indexed, length of the cube will be 5, breadth will be 4 and height will be 6.

Number of elements will be the same as the volume, which is 5 4 6 5 \cdot 4 \cdot 6 .

Moderator note:

Great! Get used to zero-indexed lists.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...