Data types and structures
185 questions. Open a question to solve it and check the official answer.
Arrays · 2 marks
(c) For the game shown above, show the values that are currently stored in the following array elements. State whether the first index number is used for the row or column. Board[…
Data types and records · 4 marks · official answer ready
(a) Write program code for the procedure PrintNameLine(Symbol, Name) Programming language .........................................................................................…
Files · 5 marks · official answer ready
(e) Zara wants to save the contents of the data structure Puzzle to a sequential file Puzzle.TXT Write program code for the procedure SavePuzzleToFile(Puzzle). Programming languag…
Arrays · 0 marks
3 A social club organises a competition for ten members. The competition consists of eight games. All ten competitors take part in all games. At the end of each game, each competi…
Data types and records · 2 marks
6 (f) Write the binary patterns for the largest and smallest positive number that can be represented with this 16-bit format for normalised real numbers. Smallest Largest [2] 12 5…
Data types and records · 16 marks
(i) A new customer with an outstanding balance of $130 is to be inserted into the linked list. On the diagram above, add the required data to the empty node. Adjust pointer(s) whe…
Data types and records · 25 marks
(ii) Describe the method to locate the position in the linked list for inserting a new record. Include how to change the pointer values. Ignore the special case in which the linke…
Data types and records · 1 mark
(i) source code ........................................................................................................................................... .......................…
Data types and records · 1 mark
(i) State what is meant by code optimisation. .....................................................................................................................................…
Data types and records · 2 marks
6 (f) Write the binary patterns for the largest and smallest positive number that can be represented with this 16-bit format for normalised real numbers. Smallest Largest [2] 12 5…
Data types and records · 16 marks
(i) A new customer with an outstanding balance of $130 is to be inserted into the linked list. On the diagram above, add the required data to the empty node. Adjust pointer(s) whe…
Data types and records · 25 marks
(ii) Describe the method to locate the position in the linked list for inserting a new record. Include how to change the pointer values. Ignore the special case in which the linke…
Data types and records · 1 mark
(i) source code ........................................................................................................................................... .......................…
Data types and records · 1 mark
(i) State what is meant by code optimisation. .....................................................................................................................................…
Introduction to abstract data types · 3 marks · official answer ready
(i) The following sequence of six data values are stored into Queue-A: Show on the diagram below the contents of Queue-A and its pointers at this stage (Stage 1). [3] 4XHXH$ 6WDFN…
Introduction to abstract data types · 2 marks · official answer ready
(ii) All the contents of Queue-A are then removed and placed on Stack-B. Show on the diagram above, the contents of Stack-B and its pointer at this stage (Stage 2). [2]
Introduction to abstract data types · 2 marks · official answer ready
(iii) Three items are removed from Stack-B and stored in Queue-A. Show on the diagram above the final contents of Queue-A and its pointers at this stage (Stage 3). [2]
Introduction to abstract data types · 1 mark · official answer ready
(iv) All the remaining items on Stack-B are removed and stored in Queue-A. Comment on the final contents of Queue-A. ..............................................................…
Data types and records · 5 marks · official answer ready
1 (a) A college provides courses for the local community. The Computing teacher, Ravi, wants to develop a program to keep details of the courses. One way of storing this data will…
Files · 6 marks · official answer ready
(ii) Write pseudocode to read the data from the file CourseData.DAT into the array Course. ........................................................................................…
