So I have this program that returns "result: true"
if (true == false != true) {
cout << "result: true";
}
else {
cout << "result: false";
}
even if we flip the comparison operators inside of the if-statement, the compiler still evaluates the expression to be true
if (true != false == true)
My question is:
- How does the compiler actually evaluates the expression?
- and to which comparison operator out of the two present inside of the if-statement, preference is given?
Aucun commentaire:
Enregistrer un commentaire