Question 6(b) 2021 · May-June · Paper 32 · 5 marks
Reveal official mark-scheme answer
Official answer for Question 6
Part (b)
Question 5
Question 1
Question 1
Question 1
Question 1
Question 1
Show text version of question
Question 6
Part (b)
Question 6
The syntax diagrams for a programming language show the syntax of:
- an assignment statement
- a variable
- an unsigned integer
- a letter
- an operator
- a digit
assignment statement
variable variable operator unsigned = integer
variable
letter digit
unsigned integer
digit digit
letter operator digit
X + 1
Y – 2
Z * 3
Part (b)
Complete the Backus-Naur Form (BNF) for the syntax diagrams shown.
<letter> has been completed for you.
<letter> ::= X|Y|Z
<assignment_statement> ::=
...................................................................................................................................................
<variable> ::=
...................................................................................................................................................
<unsigned_integer> ::=
...................................................................................................................................................
<operator> ::=
...................................................................................................................................................
<digit> ::=
...................................................................................................................................................
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_32.pdf
