Comma Operator ","
The expression
expr1, expr2, ..., exprn
can be used in places where only one expression is logically allowed. The expr1, expr2, and so on are evaluated in turn, the value of the whole expression is the value of exprn.
Example
for(i=0,j=5; i<j; ++i,--j)
printf("%d %d\n", i, j)
prints
0 5
1 4
2 3
Previous slide
Next slide
Back to first slide
View graphic version