main() { int p,a=5; if(p=a!=0) //注意此处,运算顺序为p=(a!=0),a!=0运算为1,相当于p=1; //应当注意不要将赋值=与逻辑判断==混淆 printf("%d\n",p); else printf("%d\n",p+2); }