Examveda

What will be the output of the following C# code?
{
    int i;
    Console.WriteLine("Hi");
    for (i = 1; i <= 10; i++)
        Program.Main(args);
    Console.ReadLine();
}

A. Prints 'Hi' for one time

B. Prints 'Hi' for infinite times

C. Stack overflow exception Condition generated

D. None of the mentioned

Answer: Option C


Join The Discussion

Related Questions on Control Flow Statements in C Sharp