Why Does A Float Variable Stop Incrementing At Number #20

Why does a float variable stop incrementing at number ‘16777216’ in the following C# code?</p> <pre><code class="language-csharp" line="1"> float a = 0 ; while (true) { a++; if (a > 16777216) break; } </code></pre>

Online Quiz This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Data Types, Variables and Operators - Floating and Decimal Data Types - Quiz No.1.

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

 float a = 0 ; while (true) { a++; if (a > 16777216) break; } 

Similar question(s) are as followings:



Online Quizzes of gs108 CSharp

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background