#include <stdio.h>
#include <stdlib.h>
#define PRINT3(x, y, z) \
printf(#x " = %d\t" #y " = %d\t" #z " = %d\n",x, y, z)
int main(void)
{
int x, y, z;
x = y = z = 1;
++x || ++y && ++z;PRINT3(x, y, z);
x = y = z = 1;
++x && ++y || ++z;PRINT3(x, y, z);
x = y = z = 1;
++x && ++y && ++z;PRINT3(x, y, z);
x = y = z = -1;
++x && ++y || ++z;PRINT3(x, y, z);
x = y = z = -1;
++x || ++y && ++z;PRINT3(x, y, z);
x = y = z = -1;
++x && ++y && ++z;PRINT3(x, y ,z);
return 0;
}
谜题1.6 操作符的优先级和求值顺序
最新推荐文章于 2021-08-03 21:25:10 发布