Does the compiler continue evaluating an expression where all must be true if the first is false?

后端 未结 6 1933
误落风尘
误落风尘 2020-12-11 21:41

I\'m sure this question has probably been answered before, so I apologize, but I wasn\'t able to find the proper search terms to find the answer.

Given the following

6条回答
  •  失恋的感觉
    2020-12-11 22:14

    No

    The conditional-AND operator (&&) performs a logical-AND of its bool operands, but only evaluates its second operand if necessary

提交回复
热议问题