Multidimensional Arrays | Sololearn: Learn to code for FREE!


Multidimensional Arrays

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

10/24/2017 12:30:33 PM

Elsayed Salama

1 Answer

New Answer


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