levo

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.

Your recallNot started
Key term

What must be given when a two-dimensional array is declared?

Key term

How is a single column of a two-dimensional array totalled?

Key term

What is row-major order?

Questions from this subtopic

Each one with the model answer underneath.

  1. 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. 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. 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. 4

    How many elements does an array of five rows by four columns hold?

    Model answer

    It holds 5 × 4 = 20 elements.

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

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

Fetch, , execute.
decodecompilestore

Blank Blitz makes facts automatic

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

AEncryption is reversible.
BThe stored form could be decrypted.
CA hash cannot be reversed.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

A bit is a single binary digit.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

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.