adplus-dvertising
frame-decoration

Question

Select the output for the following set of code:
static void Main(string[] args)
  {
      int i = 5;
      for (; Convert.ToBoolean(Convert.ToInt32(i)); Console.WriteLine(i--)) ;
      Console.ReadLine();
  }

a.

4 3 2 1

b.

3 2 1

c.

5 4 3 2 1

d.

2 1

Posted under C# programming

Answer: (c).5 4 3 2 1

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: