How are arguments passed in small brackets processed in C? -
this question has answer here:
- please explain comma operator in program 3 answers
- what comma operator , do? 8 answers
for following code:
int main(void) { int x = 1000, y = 5000; printf ("%d\n", x, y); printf ("%d\n", (x, y)); return 0; } output: 1000 5000
can please explain this?
its operator precedence.
in case of (x,y) first statement inside () evaluated last value y taken result (). without () comma operators have equal precedence evaluation takes left right x value taken printf()
Comments
Post a Comment