ICSE Class 10 Computer Applications Question 24 of 30

Solved Sample Paper 4 — Question 24

Back to all questions
24
Question

Question 2(iv)

Find the value of ++a * (a++ + 5) + 3 * --a, if a = 12.

Answer

The given expression is evaluated as follows:

++a * (a++ + 5) + 3 * --a (a = 12)
⟹ 13 * (a++ + 5) + 3 * --a (a = 13)
⟹ 13 * (13 + 5) + 3 * --a (a = 14)
⟹ 13 * (13 + 5) + 3 * 13 (a = 13)
⟹ 13 * (18) + 3 * 13
⟹ 234 + 39
⟹ 273