✏️ Explanatory Question

What are the types of compile-time errors?

👁 27 Views
📘 Detailed Answer
🔴 Hard
💡

Answer with Explanation

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.