Syntax errors are discovered by compiling the program and noting any problems displayed by the compiler. The compiler will not translate the program into machine code until all the syntax errors have been corrected. The compiler will also attempt to report as many syntax errors as it can find.

Logic errors are not readily obvious since the compiler will not detect them as it compiles the program. These types of errors are discovered by carefully examining the output and testing the program.