Multiple choice technology programming languages

Which of the following is jagged array creation?

  1. string [,,] aMatrix;

  2. string [][][] aMatrix;

  3. int [][]aInt= new int[3][];

  4. None of the above.

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

A jagged array in C# is an array-of-arrays where each inner array can have different lengths. The syntax uses two sets of brackets: 'int[][]' or 'int[][] = new int[3][]'. Option C shows this correctly. Options A and B are rectangular/multi-dimensional arrays (commas between brackets), not jagged arrays. Jagged arrays are declared and initialized with '[]' syntax, not '[,,]' syntax.