Multiple choice

int main() { int a=500,b=100,c=30,d=40,e=19; a+=b-=c*=d/=e%=5; printf("%d %d %d %d %d",a,b,c,d,e); }

  1. 0 -200 300 10 4

  2. 300 -200 300 10 4

  3. -200 300 10 4 0

  4. 100 -200 300 4 10

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The compound assignment evaluates right-to-left: e%=5 gives e=4, then d/=e gives d=10, then c*=d gives c=300, then b-=c gives b=-200, finally a+=b gives a=300. The final values are: a=300, b=-200, c=300, d=10, e=4.