QUESTION IMAGE
Question
int a = -8 + 15; int b = a + 3; int c = a + b; system.out.println(a + \ \ + b + \ \ + c); what is the output of the following code fragment? -6 -3 -9 -7 -4 -11 7 10 17
Step1: Calculate value of a
$a=-8 + 15=7$
Step2: Calculate value of b
Since $a = 7$, then $b=a + 3=7+3 = 10$
Step3: Calculate value of c
Since $a = 7$ and $b = 10$, then $c=a + b=7+10 = 17$
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
C. 7 10 17