Short circuit evaluation with both && || operator
The expression 5 || 2 && ++x is equivalent to 5 || (2 && ++x) due to operator precedence. The run time evaluates the expression 5 || 2 && ++x from left to right. As we know in OR if first condition is true it will not check the second condition. So here 5 evaluated … Read more