What is the output of the following code?
using System; class MainClass { public static void Main(string[] args) { int[] ints = new int[2]; Console.WriteLine (ints[0]); } }
0
Array elements are automatically initialized with the default values for their type.
The code outputs 0, because array elements are implicitly assigned to their default values.