adplus-dvertising
frame-decoration

Question

Select the output for the following set of code :
static void Main(string[] args)
  {
      float f;
      for (f = 0.1f; f <= 0.5; f += 1)
      Console.WriteLine( ++f );
      Console.ReadLine();
  }

a.

1.1

b.

0.1

c.

0.1 0.2 0.3 0.4 0.5

d.

None of the mentioned

Posted under C# programming

Answer: (a).1.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 :