teach-ict.com logo

THE education site for computer science and ICT

1. Introduction to data structures

We have discussed how data come in different types, and how data can be assigned to a single variable or constant.

But what if you have a group of related data, and want to store them together? For example, a list of student names for a class. Putting them all in as a single variable makes it difficult to work with.

The answer is to use a data structure. Data structures tell the program which pieces of data are related to one another, and how.

In this section, we will discuss the two types of data structure you will need to know about - arrays and records.

 

image