A three-dimensional array can be conceptualized either as an array of arrays of arrays (two-dimensional arrays of one-dimensional arrays) or as a three-dimensional volume consisting of the X, Y, and Z dimensions, where the Y and X dimensions are rows and columns, respectively. For our discussion, we'll consider a three-dimensional array, named array3D, either as a collection of three arrays, each consisting of 20 two-dimensional arrays, or as a volume of three layers (the Z dimension), four rows (the Y dimension), and five columns (the X dimension). Both conceptualizations are equivalent. Layers is an arbitrary name for the arrays in the Z dimension.
As you will soon see, the order of array dimensions in C is significant. The natural way to think of three-dimensional space is as an X-axis, Y-axis, and Z-axis. In C, we should think of the higher dimensions first. So, that means the Z-axis, the Y-axis, and then the X-axis. Hold...