Algorithms
(C - Structures)
UKZN – Howard College Campus
ENEL2DS H2 - 2016
, Introduction
• The slides that follow present a basic introduction to C - structures that we wi
need in order to understand fundamental data structures.
• Arrays allow us to define types of variables that can hold several data items of
same kind.
• In contrast, structure is an example of user defined data type available in C th
allows us to combine data items of different kinds.
• Structures are used to represent a record. Suppose we want to keep track of o
books in a library. We might want to track the following attributes about each
book:
• Title
• Author
• Subject
• Book ID
• We can define a structure to represent this information.