Examveda

What is the correct syntax to declare and initialize a 2D array in C# with dimensions 3x3?

A. int[3,3] matrix;

B. int[3][3] matrix;

C. int matrix[][] = new int[3][3];

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

Answer: Option D


Join The Discussion

Related Questions on Arrays and Strings in C Sharp