+ 1

If why we use 2d array to store data even we can store it in 1d array?

We can store data in both int a[1][2] and int a[2] so why 2d?

27th Mar 2020, 12:21 PM
Gaurav Rawat
Gaurav Rawat - avatar
3 Réponses
+ 3
It is useful if you want to compute data in tabular form and useful in performing operations related to matrices
27th Mar 2020, 12:36 PM
Nandan
Nandan - avatar
+ 3
For example, it would be somewhat difficult to display the points with Cartesian coordinates in a simple array.
27th Mar 2020, 2:10 PM
JaScript
JaScript - avatar