Comma operator
Programming languages binary operator / From Wikipedia, the free encyclopedia
Dear Wikiwand AI, let's keep it short by simply answering these key questions:
Can you list the top facts and stats about Comma operator?
Summarize this article for a 10 year old
SHOW ALL QUESTIONS
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.
The use of the comma token as an operator is distinct from its use in function calls and definitions, variable declarations, enum declarations, and similar constructs, where it acts as a separator.