Hi guys so I need some help understanding how these compound assignment operators work for example
int x=6;
x += x -= x * x;
x turns out to be -60 can someone explain why and how this works?
Hi guys so I need some help understanding how these compound assignment operators work for example
int x=6;
x += x -= x * x;
x turns out to be -60 can someone explain why and how this works?
Copyright © 2021 Jogjafile Inc.
Ignoring UB with sequence points:
is
so
x * x
->36
x -= 36
->x = -30
x += -30
->x = -60