CSharp - What is the output: Jagged Array Upper Bound?

Question

What is the output of the following code?

using System;


class Program
{
    static void Main(string[] args)
    {
        int[][] jaggedArray = new int[3][];
        jaggedArray[0] = new int[4] { 1, 2, 3, 4 };
        jaggedArray[1] = new int[6] { 5, 6, 7, 8, 9, 10 };
        jaggedArray[2] = new int[2] { 11, 12 };
        Console.WriteLine(jaggedArray[0].GetUpperBound(0));
        Console.WriteLine(jaggedArray[1].GetUpperBound(0));
        Console.WriteLine(jaggedArray[2].GetUpperBound(0));
    }
}


Click to view the answer

3
5
1