Can someone explain to me what true && !true does?
Here is a sample code:
I know that the nested if is executed since ((c * d) == (a - b)) = TRUE. However, if I change the nested IF to if (true && !true) instead, I don't get why Y and Z is printed. Doesn't it mean TRUE or NOT TRUE and thus X would always be printed?Code:
a = 10; b = 4; c = 2; d = 3;
if ((c + 2 < d) || ((c * d) == (a - b)))
if (true || (true && !true))