Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

consider the arithmetic expressions: int a = 7; int b = 3; a = a - b; b…

Question

consider the arithmetic expressions: int a = 7; int b = 3; a = a - b; b= (2 a); which of the following statements is true? a = 8 and b = 52 a = 4 and b = 52 a = 4 and b = 24

Explanation:

Step1: Calculate updated a

$a = 7 - 3 = 4$

Step2: Calculate updated b

$b = 3 * (2 * 4) = 24$

Answer:

a = 4 and b = 24