11.2 Constructs
259 questions in this subtopic. Open a question to solve it and check the official answer.
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…
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…
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 …
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…
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…
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…
Constructs · 9 marks · official answer ready
(b) Write pseudocode for the module ProcessArray(). ...............................................................................................................................…
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…
Constructs · 3 marks · official answer ready
(c) Give one example of a monitoring system. Explain why this is a monitoring system. Monitoring system ...........................................................................…
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 .......................…
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…
Constructs · 3 marks · official answer ready
(c) Give one example of a monitoring system. Explain why this is a monitoring system. Monitoring system ...........................................................................…
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…
Constructs · 1 mark · official answer ready
(i) Give the name of this algorithm. ..................................................................................................................................... [1]
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
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 .................................................................…
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
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. .................................................................................…
Constructs · 1 mark · official answer ready
(iii) Identify the algorithm shown in part (b). ...................................................................................................................................…
Constructs · 1 mark · official answer ready
(iv) Identify another sorting algorithm. ..................................................................................................................................... [1] …
