ICSE Class 10 Computer Applications
Question 20 of 30
Solved 2024 Question Paper ICSE Class 10 Computer Applications — Question 25
Back to all questions100
Reason — The code converts the strings "45.50" and "54.50" into doubles using Double.parseDouble(), resulting in d1 = 45.5 and d2 = 54.5. Their sum is 100.0.
Casting 100.0 to an integer using (int) removes the decimal part, leaving x = 100.