6
Q:
A) Compilation and output of "We are equal 10" | B) Compilation and output of "Not equal! 10" |
C) Compilation error, attempting to perform binary comparison on logical data type | D) Compilation and output of "Not equal! 20" |
Answer: B) Compilation and output of "Not equal! 10"
Explanation:
Explanation:
The output will be "Not equal! 10". Please note that && is logical AND operator. If first operand before (&&) is false then the other operand will not be evaluated. This illustrates that the Output +=10 calculation was never performed because processing stopped after the first operand was evaluated to be false. If you change the value of b1 to true, processing occurs as you would expect and the output would be "We are equal 20".