WJEC A-Level Computer Science 601-5345-3
Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types
Data Structures
Organisation of Data: Files and Records
Database Systems
The Operating System
Algorithms and Programs
Principles of Programming
Systems Analysis
Software Engineering and Program Construction
Types of Software System
Practical Programming
Data Security and Integrity
Computing, Society and the Law
Advanced Data Structures and Logic
Recursion, Sorting and Searching
Programming Paradigms and Translators
System Design and Human-Computer Interaction
Software Engineering Tools and Professional Practice
Advanced Architecture and Assembly Language
Communication Networks and File Organisation
Number Representation and Floating Point
Databases and Distributed Systems
Operating System Management
Software Systems and Applications
Data Security, Cryptography and Attack
Programming Paradigms and Translators
Translation and execution errors
- 3 things to know
- A2 Unit 3
Overview
Translation error, execution error and semantic error found at translation time.
What you need to know
Answer each one before you reveal it.
What is an execution error?
Why can a translator not detect an attempt to divide by zero in a general calculation?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is a translation error?
Model answer
A translation error is a fault detected by the translator before the program runs, and it prevents an executable program from being produced.
- 2
What is an execution error?
Model answer
An execution error occurs while the program is running and either stops it or causes it to produce a wrong result.
- 3
Give three examples of translation errors.
Model answer
A missing closing bracket, a keyword that has been spelled wrongly and the use of a variable that was never declared are all translation errors.
- 4
Give three examples of execution errors.
Model answer
Dividing by zero, reading beyond the last element of an array and attempting to open a file that does not exist are all execution errors.
- 5
Why can a translator not detect an attempt to divide by zero in a general calculation?
Model answer
The value of the divisor is not known until the program runs, because it depends on the data supplied at that time.
- 6
What is a semantic error found at translation time? Give an example.
Model answer
It is a fault in meaning rather than in form, such as assigning a string of text to a variable that has been declared to hold an integer.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Programming Paradigms and Translators, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.