ICSE Class 10 Computer Applications
Question 7 of 30
Solved Sample Paper 3 — Question 7
Back to all questions 7
Question Question 1(vii)
Give the output of Math.abs(x); when x = -9.99.
- -9.99
- 9.99
- 0.99
- None of these
9.99
Reason — Math.abs() returns the absolute value of its argument. Its return type is same as the type of its argument. Thus, Math.abs(-9.99) returns 9.99.