Data in a computer program is organised using a data structure. There are different methods for organising data. Arrays are a common tool used to organise data when programming.
The key role of a computer program is to store and process data. Any computer software has a data model that defines what data will be collected and worked on. The data structure defines how the flow of data is controlled in relation to inputs, processes and outputs.
Data structures can have two main characteristics. Firstly they can be static or dynamic, and secondly they can be mutable or immutable.
Steve Furber explains why planning how a program is going to store data is an important part of making software
There are many different types of data structure. Arrays and records are important examples of data structures used in programming.
We will look at how arrays are used in programming.