In the C and C++ programming languages, the comma operator (represented by the token , ) is a binary operator that evaluates its first operand and discards the result, and then evaluates the second operand and returns this value (and type); there is a sequence point between these evaluations.
as a void expression; there is a sequence point after its evaluation.
The comma operator has the lowest precedence of any C operator, and acts
The order is defined, because there is a sequence point between them. See ISO/ IEC 9899 6.5.17: The left operand of a comma operator is evaluated as a void ...
and its side effects are completed before evaluation of the expression E2
then evaluate the right hand side expression,; finally return the result of the evaluation of the right hand side expression. For example consider the ...
Order of evaluation of any part of any expression, including order of evaluation
expression , expression. Remarks. The comma operator has left-to-right associativity. Two expressions separated by a comma are evaluated ...
Not all instances of a comma in C code denote a usage of the comma operator.
Learn more about: Precedence and order of evaluation.