A two-dimensional array can be conceptualized either as an array of arrays (one-dimensional) or as a matrix consisting of rows and columns. For our discussion, we'll consider a two-dimensional array, named array2D, either as an array of four arrays of five one-dimensional elements or as a matrix of four rows and five columns. Both conceptualizations are equivalent.
In terms of the real world, there are many examples of two-dimensional arrays—hotel mail slots, windows on the side of a modern skyscraper, any video display that has a matrix of pixels, the periodic table of elements, a spreadsheet of multiple rows and columns, the selection of snacks in a vending machine, and a baseball innings scoreboard, to name a few. A two-dimensional array in C, therefore, is a useful tool for modeling many real-world matrices or grids.
If we consider array2D as an array of arrays, we have an array of four groups of a defined type...