Develop code
No description yet. This curated deck is ready for daily study.
Card preview (5)
Give three types of errors that could occur within a program.
• Syntax • Logic • Runtime
What is a syntax error?
An error that occurs when the rules of the programming language are not followed (e.g. command word is mispelled, punctuation is incorrect, variable is used without being initialised)
What is a logic error?
An error that occurs when there is a flaw in the design of a program, which does not prevent it from running but produces an incorrect or unexpected result
What is a runtime error?
An error that occurs during program execution when the processor is asked to perform an impossible operation (e.g. divide by zero, open a non-existent file)
State the purpose of a trace table.
• To allow the value of a variable, outputs and decisions in certain points throughout the algorithm to be recorded • To help detect logic errors in the program