Past-paper question · 2021 May-June · Paper 33 · Q5(c)(ii)

Question 5(c)(ii) 2021 · May-June · Paper 33 · 3 marks

Original past-paper question for 5(C)(II)
Original past-paper question for 5(C)(II)
Original past-paper question for 5(C)(II)
Reveal official mark-scheme answer Official mark-scheme answer for 5(C)(II)

Official answer for Question 5

Part (c)

(ii)

✓
Three marks for completely correct

Question 3

✓
Two marks for four alternatives correct
✓
One mark for three alternatives correct
✓
<variable> ::= <letter>
✓
| <letter><digit>
✓
| <letter><digit><digit>
✓
| <letter><letter>
✓
| <letter><letter><digit>
✓
| <letter><letter><digit><digit>
✓
Or
✓
Three marks for completely correct
✓
Two marks for three alternatives correct
✓
One mark for two alternatives correct
✓
<variable> ::= <letter>
✓
| <letter><unsigned integer>
✓
| <letter><letter>
✓
| <letter><letter><unsigned integer>
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_s21_ms_33.pdf →

Show text version of question

Question 5

Part (c)

(ii)

Question 5

The following syntax diagrams for a programming language show the syntax of:

  • an assignment statement
  • a variable
  • an unsigned integer
  • a digit
  • a letter
  • an operator

assignment statement

variable = variable operator variable

unsigned integer

variable

letter letter

unsigned integer

digit digit

letter operator digit X + 1

Y – 2

Z * 3 The syntax of a variable is changed to allow one or two letters followed by zero, one or two digits.

(ii)

Give the BNF for the revised variable.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.....................................................................................................................................

[3]

Question 10

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Programming basics

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9608_s21_qp_33.pdf

Keep practising this topic