Data types and structures
185 questions. Open a question to solve it and check the official answer.
Files · 5 marks · official answer ready
(e) Ali intends to save his board design to a text file. In a high-level programming language write the procedure SaveBoardDesign to save to the file Design.txt: • the contents of…
Arrays · 4 marks · official answer ready
(ii) The pseudocode below stores values in the data structure as follows: • it initialises the place values in the locations represented by the first row • it stores input data in…
Data types and records · 4 marks · official answer ready
2 (a) A file is set up containing information about films available to rent. Four of the fields are shown in the table below. Indicate in the right-hand column of the table the mo…
Arrays · 4 marks · official answer ready
(ii) The pseudocode below stores values in the data structure as follows: • it initialises the place values in the locations represented by the first row • it stores input data in…
Data types and records · 8 marks · official answer ready
2 Ali sets up user IDs and passwords for his program. When the user types in their user ID, the program looks up the stored password for this user ID. The stored password is the e…
Data types and records · 35 marks · official answer ready
(b) Ali uses a sequential file of records to store the user IDs and encrypted passwords. When a user types in their User ID, the program calls a function, FindPassword, with param…
Data types and records · 10 marks · official answer ready
(i) Complete the following table. Give a single value for each Field size. Field name Data type Field size (bytes) CompetitorName CompetitorAge ClubMember EventEntered EntryFee [1…
Data types and records · 8 marks · official answer ready
2 Ali sets up user IDs and passwords for his program. When the user types in their user ID, the program looks up the stored password for this user ID. The stored password is the e…
Data types and records · 35 marks · official answer ready
(b) Ali uses a sequential file of records to store the user IDs and encrypted passwords. When a user types in their User ID, the program calls a function, FindPassword, with param…
Data types and records · 2 marks · official answer ready
(i) Explain what is meant by code optimisation. ...................................................................................................................................…
Introduction to abstract data types · 2 marks · official answer ready
(i) Show on the diagram below, the contents of Stack-A and its pointer at this stage (Stage 1). [2] The contents of Stack-A are then removed and placed on Queue-B.
Introduction to abstract data types · 3 marks · official answer ready
(ii) Show on the diagram below, the contents of Queue-B and its pointers at this stage (Stage 2). [3] Three items are removed from Queue-B and input to Stack-A.
Introduction to abstract data types · 2 marks · official answer ready
(iii) Show on the diagram below, the contents of Stack-A and its pointer at this stage (Stage 3). [2] Stack-A Queue-B Stack-A 20 20 20 7 7 7 6 6 6 5 5 5 4 4 4 3 3 3 2 2 2 1 1 1 St…
Introduction to abstract data types · 1 mark · official answer ready
(iv) Three more items are removed from Queue-B and placed on Stack-A. Comment on the final contents of Stack-A. ...................................................................…
Data types and records · 2 marks · official answer ready
(i) Explain what is meant by code optimisation. ...................................................................................................................................…
Arrays · 2 marks
(i) Two one-dimensional arrays, Name and BestScore, are to store the name and score for each child in the class. Use a high-level programming language to declare these two arrays.…
Arrays · 2 marks
(i) Two one-dimensional arrays, Name and BestScore, are to store the name and score for each child in the class. Use a high-level programming language to declare these two arrays.…
Data types and records · 2 marks · official answer ready
(i) Sheena writes pseudocode that uses the variables in the table below. Complete the identifier table. Identifier Data type Description Variable used as control Ounces variable i…
Data types and records · 3 marks · official answer ready
(b) Complete the two table entries above. [3] 9
Data types and records · 12 marks · official answer ready
5 (a) A computer system stores integers in 8-bit two’s complement form. Give the denary number represented by Byte 1 and Byte 2. Byte 1 Byte 2 Byte 1 Byte 2 [2]
