Comma operator is at work here. For "," operator, given as
expr1,expr2
expr1 is evaulated, then expr2 and value of expr2 is returned as the value of comma operation. So, here we have 2 comma operator and the value returned will be that of the last expression which is 10.