Examveda

What is the correct syntax to declare a 2D array with 3 rows and 4 columns in C#?

A. int[][] matrix = new int[3][4];

B. int matrix[3, 4];

C. int[3][4] matrix;

D. int[,] matrix = new int[3, 4];

Answer: Option D


Join The Discussion

Related Questions on Arrays and Strings in C Sharp