Examveda

What is the correct way to declare and initialize a jagged array with 2 rows in C#?

A. int[][] jaggedArray = new int[2][];

B. int[,] jaggedArray = new int[2][];

C. int[2][2] jaggedArray = new int[2][];

D. int[][] jaggedArray = new int[2][2];

Answer: Option A


Join The Discussion

Related Questions on Arrays and Strings in C Sharp