What a Data Structure Is Flashcards
All 2 cards in this deck
What is a data structure?
An organised collection of values, stored so that the data can be accessed and processed together, e.g. an array or a record.
Why might a program store 30 test marks in an array rather than in 30 separate variables?
All the marks share one identifier, and a loop can use the index to process every element, so the code is shorter and easier to change.