Home / C# Programming / Arrays - C# :: Discussion

Discussion :: Arrays - C#

  1. Which of the following are the correct ways to define an array of 2 rows and 3 columns?

    1.  int[ , ] a;
       a = new int[2, 3]{{7, 1, 3},{2, 9, 6}};
    2.  int[ , ] a; 
       a = new int[2, 3]{};
    3.  int[ , ]
       a = {{7, 1, 3}, {2, 9,6 }};
    4.  int[ , ] a;
       a = new int[1, 2];
    5.  int[ , ] a; 
       a = new int[1, 2]{{7, 1, 3}, {2, 9, 6}};

     

  2. A.

    1, 2 , 3

    B.

    1, 3

    C.

    2, 3

    D.

    2, 4, 5

    E.

    4, 5

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment