What is the difference between run-time, semantec and syntax errors?
Syntax error means the program is not written to follow the rules of the language (e.g., “x = 3 + + + 5” instead of “x = 3 + 5”). Semantic errors are when the program contains a logic error — it follows the rules of the language, but does not do what the programmer intended it to do (e.g., “x = 3” when you really wanted “x = 5”). Runtime errors are errors during execution that often result from conditions outside of the programmer’s control (for example, user input, availability of external resources, etc.). Good coding will anticipate common runtime errors and handle them appropriately.