Data types and records
Arrays
Files
Abstract data types
100

Identify 5 data types

CHAR

STRING

INTEGER

BOOLEAN

REAL

100

An array can store values of both the same and different data types. True or False?

False

100

What are the three modes for using files in pseudocode

Read, Write and APPEND

100

Identify three different abstract data types

Queues

Stacks

Linked lists

200
Why is it important to characterise data when programming?
  • Identifying data types (e.g., integers, strings, floating-point numbers) helps prevent errors such as type mismatches.
  • Understanding data constraints (e.g., ranges, formats) ensures the program processes valid inputs and produces accurate results.
200

Describe the difference between a 1D and 2D array.

  • A 1D array is a linear data structure that stores elements in a single row (or column).
  • It has only one index (or subscript) to access elements.
  • A 2D array is a table-like structure that stores elements in rows and columns.
  • It has two indices: one for the row and one for the column.
200

Describe the difference between appending and writing to a file

Appending- Keeps existing content and adds new data at the end of the file 

Writing- Overwrites the entire file, deleting any existing content 

200

Describe the difference between a linear queue and a circular queue

  • A linear queue is a simple queue where elements are added at the rear and removed from the front.
  • Once an element is dequeued, that space cannot be reused.
  • A circular queue wraps back around to the start and uses any unused positions. 
300

What does the term composite data type mean?

A composite data type is a data type that groups multiple values of different or the same types into a single unit

300

Describe why you need a nested for loop to iterate through a 2D array

  • The outer loop iterates through the rows.
  • The inner loop iterates through the columns inside each row.
300

Describe why files are better than arrays when storing data.

  • Files store data permanently, even after the program terminates.
  • Arrays are temporary and exist only in memory while the program is running.
300
Explain one advantage and one disadvantage of using a linked list over an array

+ Easier to insert and delete items anywhere in a linked list by just changing pointers

- Uses more memory as every now contains two items the data and the pointer to the next node. 

400

Declare a record for an employee with the following fields: employee ID, name, age, job title and salary

TYPE Employee    

   DECLARE EmployeeID : INTEGER    

   DECLARE Name : STRING    

   DECLARE Age : INTEGER    

   DECLARE JobTitle : STRING    

   DECLARE Salary : REAL

ENDTYPE

400

Describe the difference between a linear search and a bubble sort

  • Linear Search is used to find an element in an unsorted list.
  • Bubble Sort is used to sort elements, which can then make searches (like binary search) more efficient.
400
What type of loop do we use to iterate through an external file with an unspecified size or length?

WHILE NOT EOF

400

Describe how a linked list can be implemented using arrays and variables

2 1D arrays

1 for the data

1 for the pointers

The indexes are related in each array i.e. the index 1 in the first array contains the data and the same index contains the pointer to the next node. 

A variable to store the starting node

M
e
n
u