Current location - Music Encyclopedia - QQ Music - Suppose int a=3, the value of a =a-=a*a is, the detailed process is required. Thank you.
Suppose int a=3, the value of a =a-=a*a is, the detailed process is required. Thank you.

a-=a*a is equivalent to a=a-(a*a)=-6

a =-6 is equivalent to a=a-6=-6-6 =-12

So the final result is -12

This question is calculated backwards from the back, and the value calculated at each step is assigned to the subsequent calculation. For details, see assignment expressions in C language