WJEC A-Level Computer Science 601-5345-3
Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types
Data Structures
Organisation of Data: Files and Records
Database Systems
The Operating System
Algorithms and Programs
Principles of Programming
Systems Analysis
Software Engineering and Program Construction
Types of Software System
Practical Programming
Data Security and Integrity
Computing, Society and the Law
Advanced Data Structures and Logic
Recursion, Sorting and Searching
Programming Paradigms and Translators
System Design and Human-Computer Interaction
Software Engineering Tools and Professional Practice
Advanced Architecture and Assembly Language
Communication Networks and File Organisation
Number Representation and Floating Point
Databases and Distributed Systems
Operating System Management
Software Systems and Applications
Data Security, Cryptography and Attack
Data Structures
Two-dimensional arrays
- 3 things to know
- AS Unit 1
Overview
Two-dimensional array and row-major order.
What you need to know
Answer each one before you reveal it.
How is a single column of a two-dimensional array totalled?
What is row-major order?
Questions from this subtopic
Each one with the model answer underneath.
- 1
Define a two-dimensional array.
Model answer
It is an array whose elements are reached by two indices, normally understood as a row number and a column number, so the data forms a table.
- 2
What must be given when a two-dimensional array is declared?
Model answer
The identifier, the element type, and the size of both dimensions, such as five rows by four columns.
- 3
How is a single element of a two-dimensional array referred to?
Model answer
By giving both indices, row first and then column, as in seats[2][3].
- 4
How many elements does an array of five rows by four columns hold?
Model answer
It holds 5 × 4 = 20 elements.
- 5
Give two applications that suit a two-dimensional array.
Model answer
A cinema seating plan and a table of marks with one row per pupil and one column per subject both suit it, because the data is naturally a grid of values of a single type.
- 6
How is a two-dimensional array traversed?
Model answer
With two nested loops, the outer counter running over the rows and the inner counter running over the columns, so every combination is visited.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Data Structures, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.