An array with more than one index (dimension) and that allows you to store data in a table or matrix format like rows and columns is called Multidimensional array.
Types of Multidimensional Array are mention below:
1. Two-Dimensional Array (2D Array):
Most common type
Think of it like a table or matrix
Example
int marks[2][3] = {
{85, 90, 95},
{88, 92, 96}
};
2. Three-Dimensional Array (3D Array):
Adds depth to the 2D array
Used in complex systems like 3D games, image processing
Example :
int cube[2][3][4]; // 2 blocks, 3 rows, 4 columns
Uses of Multidimensional Arrays:
Storing data in matrix form (math, graphics)
Tables, grids, game boards
Storing images, where each pixel can have R, G, B values
We use cookies to enhance your experience, to provide social media features and to analyse our traffic. By continuing to browse, you agree to our Privacy Policy.
1 Answer
Umesh Sanjyal . 2 weeks ago
An array with more than one index (dimension) and that allows you to store data in a table or matrix format like rows and columns is called Multidimensional array.
Types of Multidimensional Array are mention below:
1. Two-Dimensional Array (2D Array):
Most common type
Think of it like a table or matrix
Example
2. Three-Dimensional Array (3D Array):
Adds depth to the 2D array
Used in complex systems like 3D games, image processing
Example :
Uses of Multidimensional Arrays:
Storing data in matrix form (math, graphics)
Tables, grids, game boards
Storing images, where each pixel can have R, G, B values