What will be the output of the following C# code?
public static void Main(string[] args)
{
p();
void p()
{
Console.WriteLine("hi");
}
}
public static void Main(string[] args)
{
p();
void p()
{
Console.WriteLine("hi");
}
}A. Compile time error
B. hi
C. hi infinite times
D. None of the mentioned
Answer: Option A

Join The Discussion