Multiple choice technology programming languages

Which of the following statements correctly declares a 2 dimensional array in c#?

  1. int[,] myarray;

  2. int[][] myarray;

  3. int myarray[,];

  4. int[2] myarray;

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In C#, int[,] myarray; declares a rectangular 2-dimensional array where all rows have the same length. Option B int[][] is a jagged array (array of arrays), option C has wrong syntax, and option D declares a fixed-size 1D array.