2.5.1 Languages
Practise exam questionsLanguages — Note 3 of 3
The differences, benefits and drawbacks of using a compiler or an interpreter
A compiler translates the entire source code into machine code in one go before the program is run, creating a standalone executable file. An interpreter translates and executes the code line by line at runtime. Each has advantages and disadvantages related to speed, error handling, portability, and source code protection.
Compiler
Interpreter
Translates the whole program into machine code before execution, producing a standalone executable file.
Translates and executes code line by line at runtime, without producing an executable file.
Ready to test yourself?
Practise 2.5.1 questions