The C comma operator is a sequence point, which means that expressions separated by commas are executed from left to right. The value of the whole expression is the value of the rightmost expression, in your case 2.1 , which is assigned to the variable p .
Since the expressions in your example have no side effects, using a comma separator here makes no sense.
The brackets, on the other hand, are important because the assignment operator ( = ) is linked more strongly than the comma operator (has a higher priority) and will be evaluated before the comma operator without parentheses. So the result will be p == 1 .
source share