✏️ Explanatory Question

What are program errors? What are the types of program errors?

👁 32 Views
📘 Detailed Answer
🔴 Hard
💡

Answer with Explanation

Program errors are unexpected problems that occur while writing or executing a program, which cause the program to behave incorrectly or terminate abnormally.

Types of program errors:

  1. Syntax Errors – Occur when the rules (syntax) of the programming language are violated.

  2. Runtime Errors – Occur during program execution (e.g., division by zero, invalid input).

  3. Logical Errors – Occur when the program runs without crashing but produces incorrect results.