Evaluate the following expressions, if the values of the variables are a = 2, b = 3 and c =
9
a+ = a++ – ++b +a
a+= a++ + ++a + – – a + a – – ;
b+= b++ – ++b + a;
Answers
Answered by
0
Answer:
(a) a - (b++) * (--c);
22
WORKING
a - (b++) * (--c)
⇒ 2 - 3 * 8 [∵ b++ uses current value of b in expression and then increments it, --c decrements c to 8 and then uses this 8 in the expression]
⇒ 2 - 24
⇒ -22
(b) a * (++b) % c;
8
WORKING
a * (++b) % c
⇒ 2 * 4 % 9 [∵ ++b increments b to 4 then uses it in the expression]
⇒ 8 % 9
⇒ 8
Answered by
0
Answer:
a = 2, b = 3, c = 9
i) 2 += 2 - 4 + 3
3
ii) 2 += 2 + 4 + 3 + 3
14
iii) 3 += 3 - 5 + 2
3
Like and Mark as Brainliest, it really motivates!
Similar questions