不能理解为输出的原因 [英] Not able to understand the reason for output
本文介绍了不能理解为输出的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在运行code片段。但我不能够理解code和它产生的输出。
I am running a code snippet. But I am not able to understand the code and the output that it is producing.
#include <stdio.h>
int main()
{
int a, b,c, d;
a=3;
b=5;
c=a,b;
d=(a,b);
printf("c = %d" ,c);
printf("\nd = %d" ,d);
return 0;
}
该程序的输出是:
c=3
d=5
我没有得到的输出是怎么来的?
I am not getting how the output is coming?
推荐答案
考虑C'S逗号操作符的precedence。
Consider the precedence of the C's comma operator.
这篇关于不能理解为输出的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文