Array is a data structure that is used to store variables that are of similar data types at contiguous locations. The main advantage of array is random access and cache friendliness. There are mainly 2 types of array.
Single Dimensional and Multidimensional.
Single Dimensional Array.
Multi Dimensional Array:
A multi-dimensional array can be termed as an array of arrays that stores homogeneous data in tabular form. Data in multidimensional arrays is generally stored in row-major order in the memory.
The general form of declaring N-dimensional arrays is shown below.
Two dimensional array:
Three dimensional array:
The total number of elements that can be stored in a multidimensional array can be calculated by multiplying the size of all the dimensions.
Click here to submit your answer.s