2.3.2 Testing Flashcards
1
Q
What is a syntax error?
A
A grammatical mistake or a mistake in the rules of the programming language.
e.g. writeln(Hello World); instead of writeln(‘Hello World’);
2
Q
What is a logic error?
A
Where the program will execute however it will produce an incorrect or unexpected result.
e.g. GrossPrice = NetPrice – VAT instead of GrossPrice = NetPrice + VAT
3
Q
Give a difference between logic and syntax errors
A
With a syntax error the program will not execute, however with a logic error the program will run.