✏️ Explanatory Question

Name the type of error (syntax, runtime or logical error) in each case given below:

  1. Division by a variable that contains a value of zero.
  2. Multiplication operator used when the operation should be division.
  3. Missing semicolon.

👁 144 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

Error types:

  • (i) Runtime error: Division by zero occurs at runtime.
  • (ii) Logical error: Incorrect operator used results in wrong computation.
  • (iii) Syntax error: Missing semicolon results in a syntax error during compilation.