标签:
事实上与的优先级要大于或,可以举个例子
#include<stdio.h> void main() { int a = 0,b = 1,c = 2; if(c>0 || b>0 && a>0) printf("this is a C program.\n"); }上面这个程序输出的是 this is a C program.所以可以说明 && 的优先级大于 ||
与和或的优先级问题
原文地址:http://www.cnblogs.com/beike303603/p/4567312.html