Comma operator ( , ) in C++

Comma operator ( , )
The comma operator (,) is used to separate two or more expressions that are included where only one expression
is expected. When the set of expressions has to be evaluated for a value, only the rightmost expression is
considered.
For example, the following code:
a = (b=3, b+2);
Would first assign the value 3 to b, and then assign b+2 to variable a. So, at the end, variable a would contain the
value 5 while variable b would contain value 3.


Learn More :