Examveda

What will be the output of the following C# code?
static void Main(string[] args)
{
    m();
    Console.ReadLine();
}
static void m()
{
    Console.WriteLine("HI");
    m();
}

A. HI HI HI

B. HI

C. Stack overflow exception

D. Compile time error

Answer: Option C


Join The Discussion

Related Questions on Classes and Objects in C Sharp