Computer Science 9608 · 11

Programming

96 questions. Open a question to solve it and check the official answer.

Reset
2015 May-June · Paper 23 · Q4(c)

Programming basics · 10 marks · official answer ready

(c) The complete data file is created with the structure shown. A new program is to be written to search the file. 00001▼007 00002▼001 The program will: 00003▼002 00004▼003 • inpu…

2015 May-June · Paper 23 · Q5(c)(iii)

Constructs · 1 mark · official answer ready

(iii) Write the statement for a procedure call which processes data for 7 days for 13 workers. ....................................................................................…

2015 May-June · Paper 32 · Q1(b)

Programming basics · 6 marks · official answer ready

(b) Write the Backus-Naur Form (BNF) for the syntax diagrams shown on the opposite page. ::= ......................................................................................…

2015 May-June · Paper 32 · Q1(c)

Programming basics · 2 marks · official answer ready

(c) Rewrite the BNF rule for a variable so that it can be any number of letters. ::= ..............................................................................................…

2015 May-June · Paper 33 · Q1

Programming basics · 0 marks

1 The following syntax diagrams, for a particular programming language, show the syntax of: • an assignment statement • a variable • a number • a letter • a digit • an operator As…

2015 May-June · Paper 33 · Q1(b)

Programming basics · 6 marks · official answer ready

1 The following syntax diagrams, for a particular programming language, show the syntax of: • an assignment statement • a variable • a number • a letter • a digit • an operator As…

2015 May-June · Paper 33 · Q4(b)(ii)

Constructs · 3 marks · official answer ready

4 (b) Temperature data from a number of weather stations are to be processed by a program. The following data are to be stored: • weather station ID (a unique four-letter code) • …

2015 May-June · Paper 33 · Q6(c)(i)

Programming basics · 3 marks · official answer ready

(i) Describe what is meant by feedback in the above system. .......................................................................................................................…

2015 May-June · Paper 41 · Q1

Constructs · 5 marks · official answer ready

1 A turnstile is a gate which is in a locked state. To open it and pass through, a customer inserts a coin into a slot on the turnstile. The turnstile then unlocks and allows the …

2015 May-June · Paper 41 · Q5(a)(ii)

Constructs · 3 marks

(ii) A special case is when NameList is already in order. The algorithm in part (a)(i) is applied to this special case. Explain how many iterations are carried out for each of the…

2015 May-June · Paper 41 · Q5(b)(i)

Constructs · 2 marks · official answer ready

(i) As in part (a)(ii), a special case is when NameList is already in order. The algorithm in part (b) is applied to this special case. Explain how many iterations are carried out…

2015 May-June · Paper 42 · Q1

Constructs · 5 marks · official answer ready

1 A turnstile is a gate which is in a locked state. To open it and pass through, a customer inserts a coin into a slot on the turnstile. The turnstile then unlocks and allows the …

2015 May-June · Paper 42 · Q5(a)(ii)

Constructs · 3 marks

(ii) A special case is when NameList is already in order. The algorithm in part (a)(i) is applied to this special case. Explain how many iterations are carried out for each of the…

2015 May-June · Paper 42 · Q5(b)(i)

Constructs · 2 marks · official answer ready

(i) As in part (a)(ii), a special case is when NameList is already in order. The algorithm in part (b) is applied to this special case. Explain how many iterations are carried out…

2015 May-June · Paper 43 · Q1

Constructs · 9 marks · official answer ready

1 A petrol filling station has a single self-service petrol pump. A customer can use the petrol pump when it is ready to dispense petrol. The pump is in use when the customer take…

2015 May-June · Paper 43 · Q6(e)

Constructs · 5 marks · official answer ready

(e) Write program code for procedure X. Programming language ............................................................................................................. ........…