Question -
Select the output for the following set of code : static void Main(string[] args) { int i = 0; if (i == 0) { goto label; } label: Console.WriteLine("HI..."); Console.ReadLine(); }
Options:
A .  Hi"¦infinite times
B .  Code runs prints nothing
C .  Hi Hi
D .  Hi"¦
Answer: Option A
for i = 0 ,if condition is satisfied as (i == 0).So,label statement is printed. Output : Hi
Submit Your Solution hear: