Professional Documents
Culture Documents
Test 3 (Section 3.2) Name: . .. Date: Sign: . Comments & Mark: ..
Test 3 (Section 3.2) Name: . .. Date: Sign: . Comments & Mark: ..
Test 3 (Section 3.2) Name: . .. Date: Sign: . Comments & Mark: ..
2)
Name: …………………………………………………….……………………………..
Date:………………………………………… Sign:…………………………………….
1. Explain why the size of the memory available is particularly relevant to the process of compilation[4]
……………………………………………………………………………………………………………
...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...
……………………………………………………………………………………………………………
...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...………………………………………………………………………
2. Explain the difference between the two translation techniques of interpretation and compilation[2]
…………………………………………………………………………………………………………...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...
……………………………………………………………………………………………………………
...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...…………………………………………………………………………
3. Give one advantage of the use of each of the two translation techniques[2]
…………………………………………………………………………………………………………...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...
……………………………………………………………………………………………………………
...
1
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...………………………………………………………………………
4. State the three stages of compilation and describe briefly the purpose of each[6]
…………………………………………………………………………...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
…………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
………………………………….
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
….…………………………………………………………………
May/June 2003
6. If a sequence of high level language instructions is inside a loop and that loop will be executed 2000
times,explain why using an interpreter to run this sequence will be slower than running a compiled
version. [2]
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………….
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………..
……………………………………………………………………………………………………………
...
……………………………………………………………………………………………………………
2
…...
……………………………………………………………………………………………………………
…
3
May/June 2005
9. Describe two things that happen during code generation. [4]
……………………………………………...
……………………………………………………………………………………………………………
...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...
……………………………………………………………………………………………………………
...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……………………………………………………………………………...
……………………………………………………………………………………………………………
...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...
……………………………………………………………………………………………………………
...
……………………………………………………………………………………………………………
…...………………
May/June 2006
10. (a) Explain why a program, written in a high level language, needs to be translated before it is run on
a computer. [2]
(b) Explain how errors in the
(i) reserved words,
(ii) variables used in high level language instructions are recognized by the translator program. [4]
…………………………………………………………...
……………………………………………………………………………………………………………
...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...
4
……………………………………………………………………………………………………………
...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
…...
……………………………………………………………………………………………………………
……...…………