Test your knowledge with free interactive questions on Seneca — used by over 10 million students.

Arrays

Arrays are really useful when you have access to large amounts of related data, but you don't want to store in multiple variables.

Arrays

Arrays

  • Arrays are a data structure that stores a fixed number of values under a single identifier.
  • The values must be of the same type.
Array elements

Array elements

  • Each piece of data inside an array is called an element.
  • Each element has an index, which is its position within the array.
  • We start counting the indices from 0.
Arrays in pseudocode

Arrays in pseudocode

  • An array of ten items can be created using the following syntax:
    • array name_of_array[10]
  • Values can be assigned as follows:
    • name_of_array[0] = "Hello"
  • Values can be accessed as follows:
    • print(name_of_array[0])
Jump to other topics
1

Computer Systems

1.1

Data Representation

1.2

Data Transmission

1.3

Hardware

1.4

Software

1.5

The Internet & its Uses

1.6

Cyber Security

1.7

Automated & Emerging Technologies

2

Algorithms, Programming & Logic

Practice questions on Arrays

Can you answer these? Test yourself with free interactive practice on Seneca — used by over 10 million students.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
Answer all questions on Arrays

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