Multidimensional Arrays store information in matrix form - Data Structure

Q.  Which type of Arrays are used to store the information in a matrix form? (Data Structure)
- Published on 26 Aug 15

a. Multidimensional Arrays
b. Arrays
c. Dimensional Arrays
d. Both A and C

ANSWER: Multidimensional Arrays
 

    Discussion

  • Nirja Shah   -Posted on 21 Nov 15
    Multidimensional Arrays are used to store the information in a matrix form.
    Two-dimensional array is the simplest form of multidimensional array. Given below is a two dimensional array in which there are three rows and three columns.

    Consider the given program, it will show the 3*3 matrix.
    void main()
    {
          int a[3][3]={1,2,3,4,5,6,7,8,9};
         int i, j;
         for ( i = 0; i< 3; i++ )
       {
         for ( j = 0; j < 3; j++ )
        {
          cout << a[ i ][ j ] << "\t";
        }
       cout << "\n";
       }
    }

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)