Home / Questions / Name the type of error (syntax, runtime or logical error) in each case given below: Division by a variable that contains a value of zero. Multiplication operator used when the operation should be division. Missing semicolon.
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 to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

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.