Computing 9691 · 10

Data types and structures

185 questions. Open a question to solve it and check the official answer.

2015 May-June · Paper 23 · Q2(e)

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…

2014 October-November · Paper 11 · Q5(b)(ii)

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…

2014 October-November · Paper 12 · Q2(a)

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…

2014 October-November · Paper 13 · Q5(b)(ii)

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…

2014 October-November · Paper 21 · Q2(b)

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…

2014 October-November · Paper 21 · Q4(b)

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…

2014 October-November · Paper 22 · Q1(b)(i)

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…

2014 October-November · Paper 23 · Q2(b)

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…

2014 October-November · Paper 23 · Q4(b)

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…

2014 October-November · Paper 31 · Q6(b)(i)

Data types and records · 2 marks · official answer ready

(i) Explain what is meant by code optimisation. ...................................................................................................................................…

2014 October-November · Paper 32 · Q1(e)(i)

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.

2014 October-November · Paper 32 · Q1(e)(ii)

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.

2014 October-November · Paper 32 · Q1(e)(iii)

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…

2014 October-November · Paper 32 · Q1(e)(iv)

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. ...................................................................…

2014 October-November · Paper 33 · Q6(b)(i)

Data types and records · 2 marks · official answer ready

(i) Explain what is meant by code optimisation. ...................................................................................................................................…

2014 May-June · Paper 21 · Q2(b)(i)

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.…

2014 May-June · Paper 22 · Q2(b)(i)

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.…

2014 May-June · Paper 23 · Q1(a)(i)

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…

2014 May-June · Paper 31 · Q4(b)

Data types and records · 3 marks · official answer ready

(b) Complete the two table entries above. [3] 9

2014 May-June · Paper 31 · Q7(a)

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]