Why is 1 true and 0 false?

The reason 1 is generally accepted as the integer equivalent to true is that it is the only other number besides 0 that is available in binary numbers, and boolean values are often stored and manipulated as bits . So, it is safest to use 1 as the integer value for boolean true in your code and 0 as false.

Sizin İçin Seçtik  How do you pass a function as a parameter in flutter?

Leave a Reply

Your email address will not be published. Required fields are marked *