Are logical operators in C evaluated with short-circuit evaluation?
Answer: A
Correct answer: True
Both && and || short-circuit, and the standard requires it rather than leaving it to the compiler. If the left operand of && is false, or of || is true, the result is already determined and the right operand is not evaluated at all - side effects in it simply do not happen.
Please log in or register to report this question.