Data types and structures
283 questions. Open a question to solve it and check the official answer.
Files · 2 marks · official answer ready
(ii) Defragmenter ........................................................................................................................................... .....................…
Files · 4 marks · official answer ready
(b) The images are stored as bitmap files. Identify four items that will be stored in the header of a bitmap file. 1 ..............................................................…
Arrays · 1 mark
(ii) Give the correct term for the variable n in the pseudocode expression StockID[n]. ............................................................................................…
Data types and records · 5 marks · official answer ready
3 (a) The following table contains information about five modules in a program. It describes the calls made and the parameters passed. Module Description • repeatedly calls Module…
Data types and records · 2 marks · official answer ready
(i) State whether Module_ZA() is a function or a procedure and justify your choice. ...............................................................................................…
Data types and records · 3 marks · official answer ready
(ii) Write the pseudocode header for Module_ZB(). .................................................................................................................................…
Data types and records · 6 marks · official answer ready
(a) Write program code to implement this amended procedure ScanArray(). Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should sh…
Data types and records · 2 marks · official answer ready
(b) Context-sensitive prompts are a feature of a typical Integrated Development Environment (IDE). Explain the term context‑sensitive prompt. .....................................…
Data types and records · 3 marks · official answer ready
(i) Identify the first stage in the program development cycle. State the tasks that are completed during this stage. First stage ..................................................…
Data types and records · 1 mark · official answer ready
(ii) A program will be translated using a compiler. Identify the stage of the program development cycle where a syntax error may occur. ...........................................…
Data types and records · 16 marks · official answer ready
(b) Write pseudocode for the module Backup(). .....................................................................................................................................…
Data types and records · 16 marks · official answer ready
(c) The module description of Unpack() is repeated here for reference. Module Description • called with two parameters: o an array index Unpack() o a string value read from one li…
Data types and records · 6 marks · official answer ready
(ii) The function, Verify(), is to be amended as follows: • if the UserID is "Guest", a password is not required and TRUE should be returned • output a message to try again if the…
Arrays · 11 marks · official answer ready
(a) Write program code for the module StockSummary(). Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment state…
Data types and records · 14 marks · official answer ready
(b) Write pseudocode for the module Restore(). ....................................................................................................................................…
Data types and records · 14 marks · official answer ready
(c) The module description of GetValidFilename() is as follows: Module Description • prompts and inputs a filename • validates the filename by checking that it: • is between 4 and…
Data types and records · 1 mark · official answer ready
(ii) State the value returned by the function when it is called as shown in part (a)(i). ................................................ [1] 10
Data types and records · 2 marks · official answer ready
(i) Explain why this error can occur. ........................................................................................................................................... .…
Data types and records · 1 mark · official answer ready
(ii) Describe how the algorithm could be amended to correct the error. ............................................................................................................…
Data types and records · 17 marks · official answer ready
(c) Two additional modules are required: Module Description • called with a STRING representing a product group (for example, "ABLK") Lookup() • searches the Summary array for the…
