0

Multidimensional Arrays

Hey guys, when should I use Multidimensional Arrays or why people use it?

24th Oct 2017, 12:30 PM
Elsayed Salama
Elsayed Salama - avatar
1 Respuesta
+ 6
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
24th Oct 2017, 2:15 PM
Alice
Alice - avatar