Translators Flashcards
1
Q
Why do we need translators?
A
Programs must be translated into machine code before the processor can execute them
2
Q
What does a compiler do?
A
Translates the source code into a standalone, machine code program
3
Q
What does an interpreter do?
A
Translates the code line by line into machine code
4
Q
Advantages of a compiler? (3)
A
- Translation is done once separately
- Translated programs run faster
- Protects source code from competitors
5
Q
Disadvantages of a compiler? (2)
A
- Errors are only reported at the end of a compilation attempt
- To make edits, you must recompile the edited source code
6
Q
Advantages of an interpreter? (3)
A
- Error messages are reported as soon as they are identified, and pinpoint the error
- Code is not platform specific
- Program can be easily edited
7
Q
Disadvantges of an interpreter? (1)
A
Every line must be translated every time, so it is slower to run