Past-paper question · 2014 May-June · Paper 33 · Q1(c)

Question 1(c) 2014 · May-June · Paper 33 · 2 marks

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

Official answer for Question 1

Part (c)

Part (c)

<Underscore> ::= _

✓
<ConstName> ::= <VarName><Underscore>
[2]

Question 2

Mark scheme 9691_s14_ms_33.pdf →

Show text version of question

Question 1

Part (c)

Question 1

A set of Backus-Naur Form (BNF) rules to define a variable identifier is as follows:

1. <Letter> ::= a | b | c | d | e | f | g | h 2. <Digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 3. <Character> ::= <Letter> | <Digit> 4. <VarName> ::= <Letter> | <VarName><Character>

Part (c)

The rules are to be extended to define a rule for a constant identifier.

The identifier for a constant follows the same rules as for a variable identifier <VarName> but always ends with the underscore ( _ ) character.

Write two additional rules to include the definition for a constant identifier <ConstName>.

[2]

Question 3

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 9691_s14_qp_33.pdf

Keep practising this topic