표준은 쉼표 연산자(Comma Operator)의 피연산자 평가 순서와 시퀀스 포인트(Sequence Point)를 정의한다.
쉼표 연산자의 결과는 우측 피연산자의 값과 데이터형을 갖는다.
다음은 ISO/IEC 9899 6.5.17에 정의되어 있다.
The left operand of a comma operator is evaluated as a void expression; there is a sequence point after its evaluation. Then the right operand is evaluated; the result has its type and value. (A comma operator does not yield an lvalue.)
🔍ex)
int x = 0, y = 0, z = 0;
y = (x = 10, z = 20);
printf("%d", y);
z = 20
(우측 피연산자)의 값인 20이 된다.