4.2.1

3D Arrays

Test yourself

Arrays

Arrays are data structures which are of a fixed size and contain data of the same type stored in a contiguous block of memory.

Illustrative background for 1D arrayIllustrative background for 1D array ?? "content

1D array

  • A 1-dimensional array is a single set of data, which can be visualised in a single row. - For example: oneDArray = [A, B, C, D]
Illustrative background for 2D arrayIllustrative background for 2D array ?? "content

2D array

  • A 2-dimensional array is a set of data which can be visualised in rows and columns.
  • For example, array twoDArray = [[A, B, C, D], [E, F, G, H],[I, J, K, L]]
  • Items in a 2-dimensional array are referred to by their row number, followed by column number.
  • For example, twoDArray [1,2] = G
Illustrative background for 3D arrayIllustrative background for 3D array ?? "content

3D array

  • A 3-dimensional array is a collection of 2-dimensional arrays.
  • You can visualise each 2D array as being stored one behind the other.
    • For example, threeDArray = [[[A, B, C, D], [E, F, G, H],[I, J, K, L]], [[M, N, O, P], [Q, R, S, T],[U, V, W, X]],[[Y, Z, 0, 1], [2, 3, 4, 5], [6, 7, 8, 9]]]
Illustrative background for 3D array cont.Illustrative background for 3D array cont. ?? "content

3D array cont.

  • Items in a 3-dimensional array are referred to by their 2D array number, followed by the row number, and column number.
    • For example, threeDArray [1,2,2] = W

Jump to other topics

1Components of a Computer

2Software & Software Development

3Exchanging Data

4Data Types, Data Structures & Algorithms

5Legal, Moral, Cultural & Ethical Issues

6Elements of Computational Thinking

6.1Thinking Abstractly

6.2Thinking Ahead

6.3Thinking Procedurally

6.4Thinking Logically

6.5Thinking Concurrently

7Problem Solving & Programming

8Algorithms

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium