Multiple choice technology programming languages

What will be output of following code? 1 double d = 10.10/0.0; 2 int i = 10/0;

  1. Compile time error

  2. Runtime error at line 1

  3. Runtime error at line 2

  4. Runtime error at line 1 & 2

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Line 1: floating-point division by zero produces Infinity, not error. Line 2: integer division by zero throws ArithmeticException at runtime because integers cannot represent infinity.