Misapprehension 11: With respect to coverage, it makes no difference how a compound decision is written

Are these two decisions equivalent with respect to coverage?

Are these two decisions equivalent with respect to coverage?

The two compound decisions D1 and D2 in the figure above are functionally equivalent, i.e. all possible input combinations yield the same result. However, in the C/C++ programming language, there are differences with respect to coverage. For instance, to reach 100% Multiple Condition Coverage (MCC) for D1, you need five test cases, whereas for D2, you only need four. This is caused by the incomplete evaluation (aka short-circuit operation) of the C/C++ programming language. As soon as the compiler knows the outcome of the whole decision, evaluation is stopped. Therefore, for D2 only four test cases are possible, which are (or need to be) sufficient for 100% MC/DC.

[BTW: Because the C/C++ compiler always evaluates decisions from left to right, usage of D2 will lead to faster evaluation on average, because the short-circuit operation will occur more often for D2 than for D1.]