Three-dimensional array
A 3-D Multidimensional array contains three dimensions, so it can be considered an array of two-dimensional arrays.
Syntax for Declaration of Three-Dimensional Array
Below is the syntax to declare the Three-dimensional array
data_type array_name[sizeof_1st_dimension][sizeof_2nd_dimension][sizeof_3rd_dimension];
where,
- data_type: is a type of data of each array block.
- array_name: is the name of the array using which we can refer to it.
- sizeof_dimension: is the number of blocks of memory array going to have in the corresponding dimension.
For Example
int nums[5][10][2];
Types of Arrays
There are majorly three types of arrays
Contact Us