adplus-dvertising
frame-decoration

Question

Select the output for the following set of code :
static void Main(string[] args)
  {
      int i, j;
      for (i = 1, j = i; i <= 3 && j >= 0; i++, j--)
      {
          if (i == j)
              continue;
          else
              Console.WriteLine(j);
      }
      Console.ReadLine();
  }

a.

i = 0, j = 1;

b.

i = 1, j = 0;

c.

j = 0;

d.

None of the mentioned

Answer: (c).j = 0;

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Select the output for the following set of code :