Skip to content

Course home

Data types

Data types

Easy
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Question 3
84%

Refer to the following algorithm written in pseudocode which uses a RECORD data structure to store information about students:

RECORD Student
    name : String
    studentID : String
    yearGroup : Integer
    enrolled : Boolean
ENDRECORD

student1 ← Student('Alice', 'STU108', 10, True)
student2 ← Student('Bob', 'STU204', 11, False)
student3 ← Student('Charlie', 'STU092', 9, True)
studentRoster ← [student1, student2, student3]
highestYear ← 0
index ← 0

FOR i ← 0 TO 2
    IF studentRoster[i].yearGroup > highestYear THEN
        highestYear ← studentRoster[i].yearGroup
        index ← i
    ENDIF
ENDFOR

OUTPUT studentRoster[index].name, ' is in the highest year group'

How many different values can the field enrolled have?

A

2

B

4

C

128

D

256

Markscheme

Data types Questions

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

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

Question bank