Why? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why?

Why we use Multidimensional Arrays?? I can't understand it... It looks like make more complexes

19th Jan 2018, 2:52 PM
헬리사우드
헬리사우드 - avatar
1 Answer
+ 7
Basically multi dimension arrays are used if you want to put arrays inside an array. Say you got 10 students and each writes 3 tests. You can create an array like: arr_name[10][3] So, calling arr_name[0][0] gives you the result of student 1 on lesson 1. Calling arr_name[5][2] gives you the result of student 6 on test 3. You can do this with a 30 position array, but the multi dimension is: 1) easier to understand 2) easier to debug. Read further: https://stackoverflow.com/questions/17509964/why-do-we-use-multiple-dimensional-arrays
19th Jan 2018, 3:00 PM
Dread
Dread - avatar