Refer https://www.geeksforgeeks.org/a-comma-operator-question/
x = (3, 2, 11); -------- Comma work as operator
'()' operator has higher precedence than '='. So , firstly, bracket operator is evaluated. '()' operator is operated from left to right. but it is always the result of last that gets assigned.
y = 3, 2, 11; -------- Comma work as seperator
'=' operator has higher precedence than ',' operator. so 'y' gets initialized by '3'. '2' and '11' are just constant expression. so have no effect .
Ref: https://stackoverflow.com/questions/17251584/difference-between-int-i-1-2-3-and-int-i-1-2-3-variable-declaration-with
Ref:- https://www.geeksforgeeks.org/a-comma-operator-question/
@Mizuki,
yes, your answer is correct, i just added some other reference
@Shaik Masthan
Thank you for edits.
64.3k questions
77.9k answers
244k comments
80.0k users