Multiple choice technology programming languages

Which of following statement correctly declares a 2 dimensional array in c#.

  1. int[,] myarray

  2. int[][] myarray

  3. int[2] myarray

  4. none of above

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

In C#, a two-dimensional array is declared using comma notation inside square brackets, such as int[,]. A jagged array is declared using multiple sets of brackets like int[][], and int[2] declares a single-dimensional array of size 2.