adplus-dvertising
frame-decoration

Question

Select the output for the following set of Code:
static void Main(string[] args)
  {
      float i = 1.0f,  j = 0.05f;
      while (i  < 2.0f  &&  j  <= 2.0f)
      {
          Console.WriteLine(i++ - ++j);
      }
      Console.ReadLine();
  }

a.

0.05f

b.

1.50f

c.

-0.04999995f

d.

1.50f

Posted under C# programming

Answer: (c).-0.04999995f

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: