Multiple choice technology

What is the output of the following code? #include void main() { int a=0,b=0; a = (b = 75) + 9; printf("\n%d, %d",a, b); }

  1. 75, 9

  2. 75, 84

  3. 84, 75

  4. None of these options

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

The expression a = (b = 75) + 9 is evaluated from right to left. First, b = 75 assigns 75 to b. Then a = 75 + 9 assigns 84 to a. The printf outputs a (84) and b (75), giving '84, 75'. Option C correctly shows this output.