Sail E0 Webinar
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



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers