The output of 42 / 6 % 2 is:

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

1(iv)1 Mark · 2025 · Section A · 2025 Paper

The output of 42 / 6 % 2 is:

Show SolutionHide Solution↓

1

Reason — According to operator precedence in Java, division (/) and modulus (%) have the same priority and are evaluated from left to right.

42 / 6 % 2

= 7 % 2

= 1

← Previous questionNext question →

Browse the free Computer Applications sample bank