Evaluate the Java expression:

ICSE Class 10 Computer Applications PYQ · 2026 Paper · Section A

2(ii)1 Mark · 2026 · Section A · 2026 Paper

Evaluate the Java expression:

x = a * b % (++c) + (++a) + (--b);

if a = 7, b = 8, c = 2

Show SolutionHide Solution↓

x = a * b % (++c) + (++a) + (--b)
x = 7 * 8 % (++c) + (++a) + (--b)
x = 7 * 8 % 3 + 8 + 7 (c becomes 3, a becomes 8, b becomes 7)
x = 56 % 3 + 8 + 7
x = 2 + 8 + 7
x = 17

← Previous questionNext question →

Browse the free Computer Applications sample bank