Multiple choice

If i, j and k are integer variables with values 8, 15 and 4 respectively, the arithmetic expression 2 * ((i % 5) * (4 + (j - 3) / (k + 2))) results

  1. 26

  2. 36

  3. 34

  4. 32

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

Step by step: i%5 = 8%5 = 3; j-3 = 15-3 = 12; k+2 = 4+2 = 6; (j-3)/(k+2) = 12/6 = 2 (integer division); 4 + 2 = 6; (i%5) * 6 = 3*6 = 18; 2*18 = 36