C-the meaning of a=b=c=1

Explanation: When
a=x (x: b=c=5), because the associativity of = is from right to left, first calculate the value of x, and when calculating the value of x, it is found that x=y(y:c=5) , So you need to calculate the value of y first. When calculating the value of y, you find that y=z(z:5), so you need to calculate the value of z first.

Note: When the
variables a, b, and c are defined and no initial value is assigned, an error will be reported if a=b=c;
when a=b=c=1; this should be translated into c=1;b =c;a=b;So the statement is correct.

Guess you like

Origin blog.csdn.net/Williamcsj/article/details/107296643