Skip to content

Course home

Data structures

Data structures

EasyMedium
1234567891011121314151617181920212223
Question 21

Refer to the following pseudocode algorithm:

RECORD Game
    title : String
    genre : String
    releaseYear : Integer
    isMultiplayer : Boolean
ENDRECORD

minecraft ← Game('Minecraft', 'Sandbox', 2011, True)
portal ← Game('Portal', 'Puzzle', 2009, False)
terraria ← Game('Terraria', 'Sandbox', 2011, True)
gameLibrary ← [minecraft, portal, terraria]
latestYear ← 0
position ← 0

FOR i ← 0 TO 2
    IF gameLibrary[i].releaseYear > latestYear THEN
        latestYear ← gameLibrary[i].releaseYear
        position ← i
    ENDIF
ENDFOR

OUTPUT gameLibrary[position].title, ' is the newest game'

Which assignment statement changes the release year of the game Portal to 2007?

A

portal.releaseYear ← 2007

B

gameLibrary[0].releaseYear ← 2007

C

Game(releaseYear) ← 2007

D

portal(releaseYear) ← 2007

Markscheme

Data structures Questions

  1. GCSE
  2. /Computer Science
  3. /Data structures

36 exam-style questions on AQA GCSE Computer Science Data structures. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank