Data types and structures
223 questions. Open a question to solve it and check the official answer.
Files · 3 marks · official answer ready
(a) Bobby tells Kim that a file-based approach is usually better than a relational database. Explain why Bobby is incorrect. ......................................................…
Files · 4 marks · official answer ready
(a) Draw one line from each utility software to its correct description. Utility software Description Scans software for errors and repairs the problems Moves parts of files so th…
Files · 3 marks · official answer ready
(a) Bobby tells Kim that a file-based approach is usually better than a relational database. Explain why Bobby is incorrect. ......................................................…
Data types and records · 4 marks · official answer ready
1 (a) A program is being developed to help manage the membership of a football club. Complete the following identifier table. Example Explanation Variable name Data type value The…
Data types and records · 3 marks · official answer ready
(c) The following data items need to be stored for each student in a group: • student name (a string) • test score (an integer). State a suitable data structure and justify your a…
Data types and records · 2 marks · official answer ready
(b) The definition for module LoanReturn() is amended as follows: Module name Description Called with parameters LoanID, BookID and Fine LoanReturn() The module code checks whethe…
Files · 2 marks · official answer ready
(i) Explain how the program could use text files to speed up the process. .........................................................................................................…
Data types and records · 2 marks · official answer ready
(b) The pseudocode for Convert() contains a conditional loop. State a more appropriate loop structure. Justify your answer. Loop structure ........................................…
Data types and records · 1 mark · official answer ready
(i) Change 1 may be implemented by modifying one line of the pseudocode. Write the modified line. .................................................................................…
Data types and records · 2 marks · official answer ready
(ii) Change 2 may be implemented by moving one line of the pseudocode. Write the number of the line to be moved and state its new position. Line number ...........................…
Introduction to abstract data types · 4 marks · official answer ready
(a) Explain how a node containing data value B is added to the list in alphabetic sequence. .......................................................................................…
Introduction to abstract data types · 2 marks · official answer ready
(b) Describe how the linked list in part (a) may be implemented using variables and arrays. .......................................................................................…
Arrays · 6 marks · official answer ready
(b) The given algorithm is a simple bubble sort that arranges a set of scores stored in a one- dimensional array into descending order, and orders the corresponding students’ name…
Arrays · 6 marks · official answer ready
(b) The given algorithm is a simple bubble sort that arranges a set of scores stored in a one- dimensional array into descending order, and orders the corresponding students’ name…
Arrays · 6 marks · official answer ready
(b) The given algorithm is a simple bubble sort that arranges a set of scores stored in a one- dimensional array into descending order, and orders the corresponding students’ name…
Data types and records · 2 marks · official answer ready
(a) The following is pseudocode for the record type node. TYPE node DECLARE data : INTEGER DECLARE nextNode : INTEGER ENDTYPE Write program code to declare the record type node. S…
Arrays · 1 mark · official answer ready
(ii) Edit the main program to call the procedure outputNodes(). Take a screenshot to show the output of the procedure outputNodes(). Save your program. Copy and paste the screensh…
Data types and records · 3 marks · official answer ready
(ii) Edit the main program to: • call addNode() • output an appropriate message depending on the result returned from addNode() • call outputNodes() twice; once before calling add…
Data types and records · 2 marks · official answer ready
(a) Write program code for a new program to: • declare the global 1D array, arrayData, with ten elements • initialise arrayData in the main program using the data values shown. Sa…
Data types and records · 2 marks · official answer ready
(a) The following is pseudocode for the record type node. TYPE node DECLARE data : INTEGER DECLARE nextNode : INTEGER ENDTYPE Write program code to declare the record type node. S…
