Compilers and Intepretors Characteristics: Flashcards

1
Q

What is a compiler?

A

= Translates source code into object code and then machine code to be executed by the CPU.
= Whole programme is translated into machine code before running.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the advantages of a compiler?

A

= Execution speed is faster.
= Code is usually optimised.
= Original source code is kept secret.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the disadvantages of a compiler?

A

= Programme will not run with syntax errors= makes it difficult to write the code.
= Code needs to be recompiled when code is changed.
= Designed for a specific type of processor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an intepreter?

A

= Translates source code into machine code ready to be processed by the CPU.
= Translated line by line when the programme is running.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the advantages of a intepreter?

A

= Stops when finding a syntax error.
= Does not need to be recompiled when code is changed.
= Easier for begginner coders.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the disadvantages of a intepreter?

A

= TRanslation software is needed at run time.
= Speed of exeuction is slower.
= Code is not opttimised.
= Source code is needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly