11.3 Structured programming
32 questions in this subtopic. Open a question to solve it and check the official answer.
Structured programming · 4 marks · official answer ready
(b) The records are stored in a random access file. The function, Hash(), takes as a parameter the ISBN and returns the hash value. The disk address of the record in the hash tabl…
Structured programming · 4 marks · official answer ready
(b) The records are stored in a random access file. The function, Hash(), takes as a parameter the ISBN and returns the hash value. The disk address of the record in the hash tabl…
Structured programming · 9 marks · official answer ready
(b) Study the function StringClean(). Identify the features of the function in the following table. Feature Answer A line number containing an example of an assignment statement A…
Structured programming · 8 marks · official answer ready
(b) Study the function CountDigits(). Identify the features of the function in the following table. Feature Answer A line number containing an example of an assignment statement A…
Structured programming · 2 marks · official answer ready
(b) A procedure, AddNewScores() is being developed. The procedure will be coded using an Integrated Development Environment (IDE). Name two features provided by an IDE that assist…
Structured programming · 9 marks · official answer ready
(b) A 2D array, Picture, contains data representing a bitmap image. Each element of the array represents one pixel of the image. The image is grey-scale encoded where the value of…
Structured programming · 0 marks
4 Programming languages provide built-in functions to generate random numbers. To be truly random, the frequency of each number generated should be the same. You are required to w…
Structured programming · 1 mark
(ii) The additional statement required within the function body to complete the change from a procedure to a function. ............................................................…
Structured programming · 3 marks · official answer ready
(c) The prize draw is a success. After six months, the club decided to sell an unlimited number of tickets each week. In any week, the total number of prizes may vary. The program…
Structured programming · 3 marks
(i) The function header for this new function CalculateCustomerID .................................................................................................................…
Structured programming · 1 mark
(ii) The additional statement required within the function body to complete the change from a procedure to a function. ............................................................…
Structured programming · 1 mark · official answer ready
(iv) Give the ‘file mode’ available in the programming language which will be used to address this issue. .........................................................................…
