+ 1

3D arrays

int a[2][3]= Means 2 arrays with 3 elements each but what does this means a[x][y],[z]

21st Jun 2017, 1:07 PM
CoderAss
CoderAss - avatar
4 odpowiedzi
+ 13
There are no commas between array indexes btw. int a[3][3][3]; // declares 3D array of size 3*3*3
21st Jun 2017, 1:55 PM
Hatsy Rei
Hatsy Rei - avatar
+ 9
This is a 3D array, defined as: => An array of an array of arrays. => An array of 2D arrays. => A cube... Imagine an element as a block. An array would simply be a row or column of blocks. A 2D array will be a whole sheet or table of blocks. And a 3D array will be many of these sheets/tables, stored as elements in a row or column, like the tables in a page or book, or worksheets in an excel workbook... So a 3D array is an array of 2d arrays. By your definition, it translates to : x number of y arrays of z elements each...
21st Jun 2017, 1:16 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 3
Thankyou
21st Jun 2017, 2:02 PM
CoderAss
CoderAss - avatar
+ 1
its a 3D array .. check my codes .. i have a program to declare a 3D array with malloc function => https://code.sololearn.com/cqGaghOzVM85/?ref=app
21st Jun 2017, 10:48 PM
Anouar Fadili
Anouar Fadili - avatar