CSharp - What is the output: Local variables?

Question

What is the output of the following code?

using System;
class MainClass
{
   public static void Main(string[] args)
   {
       int x;
       Console.WriteLine (x); 
   }
}


Click to view the answer

Console.WriteLine (x);        // Compile-time error

Note

Local variables must be assigned a value before they can be read.