Is an if statement guaranteed to not be evaluated more than necessary? [duplicate]
问题 This question already has answers here : Is short-circuiting logical operators mandated? And evaluation order? (7 answers) How does C++ handle &&? (Short-circuit evaluation) [duplicate] (7 answers) Closed 6 years ago . Given two conditions with an && connection. I know that the order of evaluation is from left to right. But if the first condition resolves to false, it the second condition guaranteed to not get evaluated? #define SIZE bool array[SIZE]; int index; // play with variables // ...