Multiple choice technology programming languages

Which of these statements correctly declares a two-dimensional array in C#?

  1. int[,] testArray;

  2. int[][] testArray;

  3. int[2] testArray;

  4. System.Array[2] testArray;

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

In C#, a two-dimensional array is declared using the syntax 'type[,] arrayName' where the comma indicates the number of dimensions. 'int[,]' declares a 2D array, while 'int[][]' would be a jagged array (array of arrays).