Please explain me the output of this program:
int main() { int a,b,c,d; a=10; b=20; c=a,b; d=(a,b); printf(\"\\nC= %d\"
Well, this is about operator precedence:
c=a,b
is
equivalent to
(c=a),b
The point is, the "," operator will return the second value.
Thus
assigns a to c and returns b
d=(a,b)
returns b and assigns it to d