R

Ravi Chauhan • 11.26K Points
Tutor II

Q. Why does a float variable stop incrementing at number ‘16777216’ in the following C# code?

Code:
float a = 0 ;
while (true)
{
a++;
if (a > 16777216)
break;
}
  • (A) Sign and Exponent for ‘16777217’ is same as for ‘16777216’
  • (B) Mantissa is different for ‘16777216’ and ‘16777217’
  • (C) Sign and Exponent for ‘16777217’ is different from ‘16777216’
  • (D) None of the mentioned
  • Correct Answer - Option(B)
  • Views: 163
  • Filed under category C#

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics