Arrays | Sololearn: Learn to code for FREE!



What is the use of 2d arrays in c++

12/13/2018 5:11:47 PM

Sudhanshu Sharma

8 Answers

New Answer


2d-array is array of 1d arrays , it is generally used to store data in matrix form (in form of rows & columns) , For more information :


You can use 2d arrays in matrix storage. Usually, we may use them nicely while multiplying 2 matrixes, adding and subtracting from each other. So it is nice to use 2d arrays in matrix operations. Make, for ex. i rows, j columns of the matrixes. I personally used when studying matrix mulpitplications in visual basic in visual studio.


if you make list of mark of student and name the it difficult from 1D array and if you declare 2D array then it is easy to access input and thinking is easy ex. matrix or determinate


if you want to store Strings in an array you must define a 2d array. a 2d array is an array of arrays


A two dimension array hold one or more array


If u want to store string u should use 2d array


Multidimensional arrays store data like weather forecasting etc in the matrices format.


if you want acesss an arry by number and and for exmaple 0 or 1 and it could be number or student name and let say arry [1] is stuudent name when you use the print line method for java that would print the name of the student based on the arry number