Which term describes a data structure that holds items identified using two indices, so that it can be pictured as a table of rows and columns?
Two-dimensional array
What is meant by a one-dimensional array?
A data structure that holds related items under one name and uses a single index for each item
Which term describes a group of related data items that may have different data types, such as a student name, year group and test score stored together?
Record
What is meant by an index in a two-dimensional array?
A value that identifies the position of an item in the structure
What is a row in a two-dimensional array?
A set of items that are related and arranged horizontally, such as all the marks for one student
What is meant by iterating over a two-dimensional array?
Working through every item in the structure in turn
In a 2D array called grid, what does grid[2][4] refer to?
The item in row 2, column 4
A 2D array holds the marks for 3 students, with 5 marks each. How many items does it store?
15
Which task is best suited to storing data in a two-dimensional array?
The marks of several students across several tests
What is used to store one item in a record?
A field
Why can a record hold data of different types?
Each field in the record can have its own data type
A 2D list called students stores each student record in a row. What does students[1][2] access?
The third item of the second record
Which structure is used to process every item in a two-dimensional array?
One loop inside another loop
A two-dimensional array holds 6 marks for each of 5 students, with one student in each row. What does the third column hold?
The third mark for every student
A two-dimensional array holds 5 marks for each student, with one student in each row. A program adds together the items in the first row. What has it found?
The total of the marks for the first student
A two-dimensional list holds one student record in each row, with four fields in each record. Two loops, one inside the other, are used to print every field. What does the outer loop do?
It visits each row, one record at a time
A two-dimensional list called students holds one student record in each row. What does students[1] refer to?
The whole of the second row
We use cookies to enhance your experience. You can manage your preferences or learn more in our Cookie Policy.