C语言 if的条件相关

Expressions connected by && or || are evaluated left to right, and it is guaranteed
that evaluation will stop as soon as the truth or falsehood is known.

 ----引用自 The C Programming Language

此句表明在C语言中如果多个条件用&&或者||连接的情况下,如果测试到某一条件时整个表达式的值就已确定的情况下,则不会计算后续的表达式.

posted @ 2012-09-10 19:07  wccc  阅读(202)  评论(0编辑  收藏  举报