【C语言】逗号运算符的使用举例
#include<stdio.h> int main(void) { int a = 1, b = 2, c = 4, y, z; y = a + b, a + c;/*由y=a+b和a+c组成的逗号表达式*/ z = (a + b, a + c);/*将逗号表达式a+b,a+c的值赋值给变量z*/ printf("y=%d,z=%d\n", y, z); return 0; }
本文来自博客园,作者:木子欢儿,转载请注明原文链接:https://www.cnblogs.com/HGNET/p/11865137.html