Question 3(b) 2017 · October-November · Paper 31 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 3
Part (b)
Question 1
Question 6
Question 1
Question 1
Question 1
Question 1
Question 1
Show text version of question
Question 3
Part (b)
Question 3
The following syntax diagrams for a particular programming language show the syntax of:
- an assignment statement
- a variable
- an unsigned integer
- a letter
- an operator
- a digit.
Assignment statement
Unsigned Variable := Variable Operator integer
Variable Digit Letter Digit
Question 1
Unsigned integer
Question 2
Digit
Question 3
Question 4
Letter Operator
Question 5
^ 8
Question 9
0
Question 6
Part (b)
Complete the Backus-Naur Form (BNF) for the syntax diagrams shown.
<digit> has been done for you.
<assignment_statement> ::=
...................................................................................................................................................
<variable> ::=
...................................................................................................................................................
<unsigned_integer> ::=
...................................................................................................................................................
<digit> ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0
<letter> ::=
...................................................................................................................................................
<operator> ::=
...................................................................................................................................................
Question 7
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_w17_qp_31.pdf
