The output of Math.max(-7, Math.min(-5, -4)) is:

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

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

The output of Math.max(-7, Math.min(-5, -4)) is:

Show SolutionHide Solution↓

-5

Reason — The method Math.min(-5, -4) returns the smaller of the two values, which is -5. Then, Math.max(-7, -5) returns the greater of the two values, which is -5. Hence, the final output of Math.max(-7, Math.min(-5, -4)) is -5.

← Previous questionNext question →

Browse the free Computer Applications sample bank