Computer Science 9608 · 11

11.2 Constructs

259 questions in this subtopic. Open a question to solve it and check the official answer.

Reset
2019 May-June · Paper 22 · Q1(b)(i)

Constructs · 5 marks · official answer ready

(i) Evaluate each expression in the following table. If an expression is invalid, write ERROR. For the built-in functions list, refer to the Appendix on page 16. Expression Evalua…

2019 May-June · Paper 22 · Q2(c)

Constructs · 3 marks · official answer ready

(c) The following lines of code are taken from a high-level language program. WHEN Result < 20 { Call ResetSensor(3) Result := GetSensor(3) } Identify the type of control structur…

2019 May-June · Paper 22 · Q6(a)

Constructs · 8 marks · official answer ready

(a) Write program code for the module GetInfo(). Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment statement …

2019 May-June · Paper 22 · Q6(b)

Constructs · 8 marks · official answer ready

(b) Write program code for the module TopLevel(). Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment statement…

2019 May-June · Paper 23 · Q1(b)(i)

Constructs · 6 marks · official answer ready

(i) Program variables have values as follows: Variable Value MeltingPoint 180.5 Soluble FALSE Attempt 3 ProductName "Mushroom Compost" Version 'A' ProductID "BZ27-4" Evaluate each…

2019 May-June · Paper 23 · Q6(a)

Constructs · 8 marks · official answer ready

(a) Write program code for the module SearchFile(). Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment stateme…

2019 May-June · Paper 23 · Q6(b)

Constructs · 9 marks · official answer ready

(b) Write pseudocode for the module ProcessArray(). ...............................................................................................................................…

2019 May-June · Paper 31 · 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 31 · 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 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(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 · 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] …