【发布时间】:2014-06-16 10:05:08
【问题描述】:
考虑代码:
if(x = a/b, a%b)
printf("do this");
else
printf("do that");
现在,如果我将 if 语句替换为 if(x = a/b && a % b)。然后它也有效。所以我想知道用&& 运算符替换逗号,反之亦然,在if-else and loops 中是否总是有效
【问题讨论】:
标签: c comma-operator