I am running a code snippet. But I am not able to understand the code and the output that it is producing.
#include
int main()
{
int a,
d=(a,b);
is evaluated as d=b
.=
has a higher precedence over the comma, so the expression c=a,b;
is evaluated as (c=a),b;
Not part of the answer, but worth mentioning that the whole c=a,b;
expression, is evaluated as b
, not a, e.g. if you write d=(c=a,b);
you get c=a
AND d=b
;