Examveda

What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 0;
    if (i == 0)
    {
        goto label;
    }
    label: Console.WriteLine("HI...");
    Console.ReadLine();
}

A. Hi... infinite times

B. Code runs prints nothing

C. Hi Hi

D. Hi...

Answer: Option D


Join The Discussion

Related Questions on Control Flow Statements in C Sharp