— I=0 is false, because it returns 0, and 0 is the only integral that casts to false
— Can you explain what exactly happens there, why there are 2,1,0?
— Because I don't remember ever seeing such syntax
— I= 0 means assignment of 0 in a variable named i. Is int i=0; if i
Same as int i=0;
I=(2,1,0) evaluates to i= 0 bcoz associativity of paranthesis is from left to right . There is nothing wrong in this syntax
— Comma operator
— Yep but you can do int a,b,c; a = b = c = 5; it will execute c = 5, the result will be 5 and it will be assigned to b, and the result of this will again be 5 and then it will be assigned to a. in your case 0 is assigned and result (again 0) is casted into bool