plz explain how comma operator is effecting the value of VAL and o/p is showing 11 instead of 22
]#include<stdio.h> int main() { int val; (val=11) + (val=22, printf("VAL = %d\n", val) ); return 0; }
Output:VAL=11
On mine it shows 22. Why do you think this could be? What did you learn from your last question?
Interesting? Why is this warning thrown?
i compiled d code in gcc 4.4.5....it gave VAL=11...well according to functioning of comma operator 22 should be returned as value of VAL...source:http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6409..