C语言中int a=1,b=2,c=3; c=(a+=a+2),(a=b,b+3); printf

如题所述

int a=1,b=2,c=3; c=(a+=a+2),(a=b,b+3); printf("c=%d",c);
程序运行后,将输出:
c=4
因为, c=(a+=a+2),(a=b,b+3);是一个逗号表达式,
它等价于:
(c=(a+=a+2)),(a=b,b+3); //因为逗号运算符的优先级为最低。
温馨提示:答案为网友推荐,仅供参考
相似回答