csharp Collections Questions & Answers

Question 1: Which of the following is a correct way to initialize an array?

Question 2: Which of the following statement(s) are TRUE?

Question 3: Which of the following method returns the highest index of an array?

ADVERTISEMENT

Question 4: Which of the following array declaration is valid?

Question 5: What will be the output of the following program?

public class Program
{
	public static void Main()
	{
		string[] strArr = {"Hello","World"};
  
  		object[] objArr = strArr;
		
		Console.Write(objArr[0]);
	}
}