An array which can have arrays as its element are called multi-dimensional array. Or in simple words if array has more then one subscript then it is called multi-dimensional array.
type arrayName [SubscriptSize1 ][SuscriptSize2]...[SubscriptSizeN];
In example 1 arr means 5 rows and 10 columns. Since its a char array so each row can contain a string of max 10 characters and total 5 such strings are possible.
In example 2 arr means 50 arrays of example 1.
Multi-dimensional Array Visualization
Once we visulize the array in the following manner nothing is complex see the following figure which is a representation of array.
Though in the above example we have seen the array in the matrix form or matrix of matrix form but in reality they are stored in the contiguous fashion in the memory.
a = a + Size of Data Type
Assume that we have an array a as a and the base address i.e. a is 1000, and size of data type is say 2. Then it will have following address in the memory -
An array is a collection of same type of elements which are sheltered under a common name.
Instead of declaring individual variables, such as elem0, elem1, ...one can declare one array variable such as elem and use elem, elem, ...to represent individual variables. A specific element in an array is accessed by an index.