C++ Multidimensional Arrays (2D and 3D Arrays) - Coding With Clicks
@CodingWithClicks -------------------------------------Multi-Dimensional Arrays----------------------------------------- We'll learn about multi-dimensional...
🔥 Related Trending Topics
LIVE TRENDSThis video may be related to current global trending topics. Click any trend to explore more videos about what's hot right now!
THIS VIDEO IS TRENDING!
This video is currently trending in Bangladesh under the topic 's'.
About this video
@CodingWithClicks
-------------------------------------Multi-Dimensional Arrays-----------------------------------------
We'll learn about multi-dimensional arrays in C++ in this video. Multidimensional Array means an array having more than one dimension. There are different types of multidimensional arrays like 2D, 3D, 4D and 5D Array. But most important and most commonly used multidimensional array is 2D array and after that 3D array. So we will learn 2D Arrays and 3D Arrays in this video. How to declare, access, and use 2D and 3D Arrays effectively in C++ program.
-------------------------------------Two Dimensional Arrays-----------------------------------------
As an example: int x [ 2 ][ 4 ];
x is a two dimensional array in this case and it can hold maximum 8 values.
2D Array Initialization:
int x[2][4] = {{1,2,3,4},{5,6,7,8}};
Because this array contains two rows and four columns, we have two rows of elements with four elements each.
-------------------------------------Three Dimensional Arrays-----------------------------------------
Three dimensional Array also work similarly. Three dimensional Array is actually a collection of 2D arrays.
For example: int x [ 3 ][ 2 ][ 4 ];
By simply multiplying the dimensions of the array, we can determine how many elements are there in total: 3*2*4 = 24
Here x is a three dimensional array which contains 24 elements.
2D Array Initialization:
int x[3][2][4] = {
{{1,2,3,4},{5,6,7,8}},
{{9,10,11,12},{13,14,15,16}},
{{17,18,19,20},{21,22,23,24}},
};
The first dimension has value 3 which is representing total no of 2D arrays, second dimension has value 2 which represents no of rows and third dimension has value 4 which represents no of columns.
#C++MultidimensionalArray #2DArray #twodimensionalArray #3DArray #ThreeDimensionalArray #C++TutorialForBeginners #C++FullCourse #C++Programming #codingwithclicks
Video Information
Views
3.1K
Total views since publication
Likes
84
User likes and reactions
Duration
8:00
Video length
Published
Dec 16, 2022
Release date
Quality
hd
Video definition
About the Channel
Tags and Topics
This video is tagged with the following topics. Click any tag to explore more related content and discover similar videos:
#Two dimensional Array in C++ #2D Arraysin C++ #Multidimensional Array in C++ #3D Arrays in C++ #Three Dimensional Array in C++ #Multidimensional #2D Array #3D Array #two dimensional #Three Dimensional #Array #2D #3D #C++ tutorial for beginners #C++ full course #C++ Programming #C++ full course in hindi #C++ for beginners #C++ tutorial #C++ course #C++ Programming for beginners #Coding With Clicks #Coding #With #Clicks
Tags help categorize content and make it easier to find related videos. Browse our collection to discover more content in these categories.