csharp Collections Questions & Answers

Question 11: Which of the following is FIFO (First In First Out) collection?

Question 12: What will be the output of the following code?

int[ , ] x = new int[ 3, 2 ]; 
Console.WriteLine(x.Length);

Question 13: Array can be resized dynamically in C#.

ADVERTISEMENT

Question 14: What will be the output of the following code?

int[][][] arr = new int[2][][] 
{
    new int[2][]  
    { 
        new int[3] { 1, 2, 3},
        new int[2] { 4, 5} 
    },
    new int[1][]
    { 
	    new int[3] { 7, 8, 9}
    }
};

Console.WriteLine(arr[1][0][1]); 

Question 15: Indexer in C# is a special type of _________.