(a) Give two differences between a compiler and an interpreter in Table 2.
Table 2
| Compiler |
Interpreter |
(b) State one advantage of coding in:
(i) high level programming language;
(i) low level programming language.
(c) Outline two characteristics of a good program.
(a)
| Computer | Interpreter |
| Intermediate object code is generated | No intermediate object code is generated |
| Takes the entire program at once | Translate sources program line by line |
| Comparatively faster in execution | Slower in execution |
| Error detection is difficult | Comparatively easy |
| More memory requirement | Requires less memory |
(b) Advantages of coding in high level programming language are:
(i) I. Provides higher level of abstraction; allows programmes to focus on the logic and functionality of their programs rather than hardware or complex low-level operations.
II. Easy to code, debug and maintain.
(ii) Advantages of coding in low level programming language are:
I. Faster execution times
I. Greater control over hardware resources
(c) Characteristics of a good program
I. Correctness: a good program must produce the desired output for a given input.
II. Maintainability: Must be easy to modify, update and debug
III. Readability: Must be clear, concise and understandable.
IV. Reliability: Must consistently perform correctly under various conditions.
V. Efficiency: Must use system resources (time, memory, etc.) optimally.
VI. Portability: Must be able to run on different platforms with minimal modifications.
Contributions ({{ comment_count }})
Please wait...
Modal title
Report
Block User
{{ feedback_modal_data.title }}