Classification of programming languages and translators

EasyMedium
12345678910111213141516171819202122232425262728293031323334
Question 8
Easy

The program shown in Figure 4 contains a syntax error.

1  score = 0
2  attempts = 5
3  while attempts > 0
4      score = score + 10
5      attempts = attempts - 1
6  print("Final score: " + score)

Figure 4

Shade two lozenges to indicate the statements that are true about syntax errors.

  • A: A syntax error occurs when the program does not produce the expected output for a given input.
  • B: A syntax error is a mistake where the rules of the programming language are broken.
  • C: A syntax error is usually harder for an integrated development environment (IDE) to detect than a logic error.
  • D: A compiler will not successfully translate a source code file that contains a syntax error.
  • E: An example of a syntax error is trying to divide a number by zero during execution.
[2]

Classification of programming languages and translators Questions

  1. GCSE
  2. /Computer Science
  3. /Classification of programming languages and translators