which type(s) of error(s) does a compiler detect: syntax error and/or semantic error and/or runtime error ?
A program with a syntax error cannot be executed. The program with a runtime error can be executed but dumps under certain conditions. Example: You have a division statement in your program. If for some reason the denominator becomes zero then you will get a runtime error (something like DIVISION_BY_ZERO). Syntax errors are static error that can be detected by the compiler. Runtime errors are dynamic error that cannot be detected by the compiler. Regards.