When you create an array, C# initializes the value for each element.
using System;
class Program
{
static void Main(string[] args)
{
int[] intArray = new int[10];
for (int i = 0; i < intArray.Length; i++)
{
Console.WriteLine(intArray[i]);
}
}
}
The output:
0
0
0
0
0
0
0
0
0
0