Computer Science 9608 · 11

Programming

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

2019 May-June · Paper 32 · Q3(b)(ii)

Programming basics · 2 marks

(ii) Draw loops around appropriate groups of 1s in the K-map to produce an optimal sum-of-products. [2]

2019 May-June · Paper 32 · Q3(b)(iii)

Programming basics · 2 marks

(iii) Write the simplified sum-of-products Boolean algebraic expression for the truth table. X = ..................................................................................…

2019 May-June · Paper 32 · Q8(b)

Constructs · 6 marks · official answer ready

(b) One of the main tasks of an operating system is resource management. Describe how an operating system can maximise the use of resources. Primary memory .......................…

2019 May-June · Paper 33 · Q4(a)

Programming basics · 3 marks · official answer ready

(a) Complete the symbol table to show its contents after the lexical analysis stage. Token Symbol Value Type Counter 60 Variable [3]

2019 May-June · Paper 33 · Q4(b)

Constructs · 2 marks · official answer ready

(b) The output from the lexical analysis stage is stored in the following table. Each cell stores one byte of the output. Complete the output from the lexical analysis using the k…

2019 May-June · Paper 33 · Q6(c)

Constructs · 3 marks · official answer ready

(c) Give one example of a monitoring system. Explain why this is a monitoring system. Monitoring system ...........................................................................…

2019 May-June · Paper 41 · Q2(b)

Constructs · 6 marks

(b) The club also considers storing the data in the order in which it receives the scores as a linked list in a 1D array of records. The following pseudocode algorithm searches fo…

2019 May-June · Paper 41 · Q2(f)(i)

Constructs · 1 mark · official answer ready

(i) Give the name of this algorithm. ..................................................................................................................................... [1]

2019 May-June · Paper 42 · Q1(a)(i)

Constructs · 5 marks · official answer ready

(i) Complete the binary tree to show how the data above will be organised. RootPointer The symbol Ø represents a null pointer LeftPointer RightPointer 36 21 Ø 45 65 Ø 66 Ø [5] 3

2019 May-June · Paper 42 · Q2(b)(iii)

Structured programming · 7 marks · official answer ready

(iii) The stack is implemented as a 1D array, with eight elements, and given the identifier ArrayStack. The global variable Top contains the index of the last element in the stack…

2019 May-June · Paper 42 · Q3(a)

Constructs · 4 marks · official answer ready

3 (a) Identify and describe two features of an editor that can help a programmer to write program code. Feature 1 .................................................................…

2019 May-June · Paper 42 · Q4(b)(i)

Constructs · 4 marks · official answer ready

(i) Complete the trace table for the algorithm given in part (b), for the ArrayData values given in the table. ArrayData Count TempValue Sorted 0 1 2 3 4 5 5 20 12 25 32 29 [4] 19

2019 May-June · Paper 42 · Q4(b)(ii)

Constructs · 3 marks · official answer ready

(ii) Rewrite lines 4 to 12 of the algorithm in part (b) using a WHILE loop instead of a FOR loop. .................................................................................…

2019 May-June · Paper 42 · Q4(b)(iii)

Constructs · 1 mark · official answer ready

(iii) Identify the algorithm shown in part (b). ...................................................................................................................................…

2019 May-June · Paper 42 · Q4(b)(iv)

Constructs · 1 mark · official answer ready

(iv) Identify another sorting algorithm. ..................................................................................................................................... [1] …

2019 May-June · Paper 43 · Q2(b)

Constructs · 6 marks

(b) The club also considers storing the data in the order in which it receives the scores as a linked list in a 1D array of records. The following pseudocode algorithm searches fo…

2019 May-June · Paper 43 · Q2(f)(i)

Constructs · 1 mark · official answer ready

(i) Give the name of this algorithm. ..................................................................................................................................... [1]

2018 October-November · Paper 11 · Q7(d)

Constructs · 4 marks · official answer ready

(d) Write an SQL script to display the title and rating of all movies scheduled to play on screen number 3. .......................................................................…

2018 October-November · Paper 21 · Q1(a)

Constructs · 6 marks

1 (a) The following table contains statements written in pseudocode. Show what type of programming construct each statement represents. Put a tick (3) in the appropriate column fo…

2018 October-November · Paper 21 · Q2(c)(iii)

Programming · 2 marks · official answer ready

(iii) Explain how the use of constants helps to minimise programming errors. ......................................................................................................…