Mega Code Archive

 
Categories / C Tutorial / Operator
 

Short circuiting

When evaluating logical expressions, C uses the technique of short circuiting. C1 && C2 && C3 && C4 So if C1 is false C2, C3, and C4 are not evaluated. C1 || C2 || C3 || C4 So if C1 is true C2, C3, and C4 are not evaluated.