There are mainly four types of program errors:
(i) Syntax errors – Errors that occur when the rules (syntax) of a programming language are violated.
(ii) Semantic errors – Errors that occur when the code follows the syntax but is improperly structured or logically incorrect.
(iii) Logical errors – Errors that occur when the program runs but does not produce the expected output due to incorrect logic.
(iv) Run-time errors – Errors that occur during execution, usually due to unavailable resources or unexpected values.
First read the answer fully, then try to explain it in your own words. After that, open a few related questions and compare the concepts. This method helps you remember the topic for a longer time and improves exam preparation.