0
How will the compiler work when we simply pass a value in if statement For eg. If(32) Cout<<"true"; Else Cout<<"false";
2 Respuestas
0
It will turn the value into a boolean value.
In many languages, e.g. C++, 0 is equal to false and any other number (including negatives) represents true.
As a result for every other value than 0 the if-statement will be executed, otherwise the optional else-statement.
0
Thanks brother