✏️ Explanatory Question
The main types of compile-time errors are:
Syntax errors – e.g., missing brackets, semicolons, or incorrect statements.
Type errors – e.g., assigning an integer to a string variable.
Semantic errors – when the meaning of the code is invalid, even though syntax is correct.