11.2 Constructs
140 questions in this subtopic. Open a question to solve it and check the official answer.
Constructs · 7 marks · official answer ready
(a) Up to 16 characters can be displayed. Track titles longer than 16 characters will need to be trimmed as follows: • Words must be removed from the end of the track title until …
Constructs · 8 marks · official answer ready
(c) Two modules are defined: Module Description DeleteComment() • called with a parameter of type string representing a line of (already written) pseudocode from a student’s proje…
Constructs · 4 marks · official answer ready
(b) The main program asks the user to enter "easy", "medium" or "hard" and calls ReadWords()with the filename that matches the user’s input. For example, if the user enters "easy"…
Constructs · 4 marks · official answer ready
(iii) The method OutputTree()outputs the left pointer, the data and the right pointer for each node that has been inserted into the tree. The outputs are in the order they are sav…
Constructs · 3 marks · official answer ready
(b) Give one example of an embedded system and explain why it is an example of an embedded system. Example ........................................................................…
Constructs · 4 marks
22 END ... 100 0 101 0 ... 110 51 111 65 ASCII Character value 49 1 50 2 51 3 [4] 52 4 ... 65 A 66 B 67 C 68 D 16 reasonable effort has been made by the publisher (UCLES) to trace…
Constructs · 2 marks · official answer ready
(ii) Identify two differences between special purpose registers and general purpose registers. 1 ..................................................................................…
Constructs · 5 marks · official answer ready
2 (a) An algorithm is expressed as follows: • input 100 numbers, one at a time • keep a total of all numbers input that have a value between 30 and 70 inclusive and output this to…
Constructs · 2 marks · official answer ready
(b) Sequence is one programming construct. Identify two other programming constructs that will be required when the algorithm is converted into pseudocode. Construct 1 ...........…
Constructs · 11 marks · official answer ready
(b) The global array is changed to a 2D array, organised as 150 rows by 2 columns. It is declared in pseudocode as follows: DECLARE Data : ARRAY[1:150, 1:2] OF STRING The algorith…
Constructs · 3 marks · official answer ready
(a) The pseudocode contains three errors due to the incorrect use of operators. Identify each error and state the correction required. 1 ..........................................…
Constructs · 2 marks · official answer ready
(i) Explain the problem with the algorithm. .......................................................................................................................................…
Constructs · 3 marks · official answer ready
(c) The data that needs to be stored for each customer order in part (a) is not all of the same type. Describe an effective way of storing this data for many customer orders while…
Constructs · 15 marks · official answer ready
(a) Write pseudocode for the procedure Count(). ...................................................................................................................................…
Constructs · 12 marks · official answer ready
(i) Describe the circumstances and explain the problem. Circumstances .............................................................................................................…
Constructs · 12 marks · official answer ready
(d) Module GetData() returns the data field from a message that has been received. If no message is available, the module waits until one has been received. Explain the limitation…
Constructs · 5 marks · official answer ready
6 An interrupt is generated when a key is pressed on a computer keyboard. Explain how the computer handles this interrupt. ........................................................…
Constructs · 4 marks · official answer ready
(a) Describe how a typical Integrated Development Environment (IDE) could be used to help debug the program to find the errors in the function Calculate(). .......................…
Constructs · 6 marks · official answer ready
6 A video-conferencing program supports up to six users. Speech from each user is sampled and digitised (converted from analogue to digital). Digitised values are stored in array …
Constructs · 7 marks · official answer ready
(b) A new module has been defined: Module Description CheckNewItem() • called with a parameter of type string representing a line of item information • checks to see whether an it…
