Programming
471 questions. Open a question to solve it and check the official answer.
Constructs · 2 marks · official answer ready
(c) By value is one method of passing a parameter to a subroutine. Identify and describe the other method. Method .................................................................…
Constructs · 4 marks · official answer ready
(a) The student has written a structured English description of the algorithm: 1. START at the beginning of the string 2. SELECT a character from the string 3. CONVERT the charact…
Constructs · 7 marks · official answer ready
(b) Write pseudocode to implement the program. You should note the following: • InString contains the string to be checked. It has been assigned a value. • The elements of the arr…
Constructs · 3 marks · official answer ready
(i) The pseudocode includes features that make it easier to read and understand. State three such features. Feature 1 .............................................................…
Constructs · 4 marks · official answer ready
(i) Programming languages support different data types. Complete the table by giving a suitable data type for each example value. Example value Data type 43 TRUE − 273.16 "− 273.1…
Constructs · 4 marks · official answer ready
(ii) Evaluate each expression in the following table. If an expression is invalid then write ‘ERROR’. Refer to the Appendix on page 18 for the list of built-in functions and opera…
Structured programming · 6 marks · official answer ready
(a) Write pseudocode for the procedure Button(). Declare any additional variables you use. The value of MaxVol should not be changed within the procedure. Parameter validation is …
Structured programming · 6 marks · official answer ready
(b) The procedure Button() is to be tested using black-box testing. Fill in the gaps below to define three tests that could be carried out. TEST 1 – VolLevel is changed Parameter …
Structured programming · 3 marks · official answer ready
(ii) Stub testing is a technique often used in the development of modular programs. Describe the technique. .......................................................................…
Constructs · 9 marks · official answer ready
(b) Write pseudocode for the module ProcessStudentList(). The module description is repeated here for reference. Module Outline description • Read each line from the file StudentL…
Programming · 6 marks · official answer ready
(i) Programming languages can support different data types. Complete the table by naming three different data types together with an example data value for each. Data type Example…
Constructs · 1 mark · official answer ready
(ii) Write a single statement in program code that contains two of the stages. Do not repeat any of the statements from part (c)(i). ..............................................…
Structured programming · 8 marks · official answer ready
(ii) Function FindBooksBy() will: • receive the Author Name as a parameter • search Library.txt for matching entries • store the Book Title and Location of matching entries in the…
Constructs · 1 mark · official answer ready
(i) 35 > 24 Reason .............................................................................................................................. .................................…
Constructs · 1 mark · official answer ready
(ii) abc := cba Reason .............................................................................................................................. .............................…
Constructs · 1 mark · official answer ready
(iii) bc < 49 Reason .............................................................................................................................. ...............................…
Programming basics · 2 marks · official answer ready
(c) Draw loops around appropriate groups in the K-map in part (b) to produce an optimal sum-of- products. [2]
Programming basics · 2 marks · official answer ready
(d) Write, using your answer to part (c), a simplified sum-of-products expression for the truth table. X = ........................................................................…
Constructs · 3 marks · official answer ready
(b) State three characteristics of massively parallel computers. 1 ................................................................................................................…
Programming basics · 2 marks · official answer ready
(iii) Draw loop(s) around appropriate groups in the table in part (a)(ii), to produce an optimal sum-of-products. [2]
