✏️ Explanatory Question
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:
Syntax Errors – Occur when the rules (syntax) of the programming language are violated.
Runtime Errors – Occur during program execution (e.g., division by zero, invalid input).
Logical Errors – Occur when the program runs without crashing but produces incorrect results.