Answers for "0 1 true false c++"

C++
0

0 1 true false c++

false == 0 and true = !false

//i.e. anything that is not zero and can be converted to a boolean is not false, thus it must be true.

//Some examples to clarify:
if(0)          // false
if(1)          // true
if(2)          // true
if(0 == false) // true
if(0 == true)  // false
if(1 == false) // false
if(1 == true)  // true
if(2 == false) // false
if(2 == true)  // false
cout << false  // 0
cout << true   // 1
Posted by: Guest on October-25-2021

Code answers related to "0 1 true false c++"

Browse Popular Code Answers by Language