levo

Data Structures

Two-dimensional arrays

  • 3 things to know
  • AS Unit 1
Start revising · £5/month

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.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

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

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

Fetch, , execute.
decodecompilestore

Blank Blitz consolidates the facts

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

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

A bit is a single binary digit.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

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.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.