短路求值
时间:2019-06-25 13:44:15
收藏:0
阅读:93
#include<iostream> using namespace std; int main() { int a=3,b=3; (a=0)&&(b=5); printf("a=%d,b=%d\n",a,b); (a=1)||(b=5); printf("a=%d,b=%d",a,b); }

a=0为假所以没有对B进行操作
a=1为真,所以没有对b进行操作
原文:https://www.cnblogs.com/helloworld2019/p/11082051.html
评论(0)