July 2022
Intermediate to advanced
304 pages
7h 6m
English
In this chapter, we’ll move beyond arrays and simple types to create more complex data types. We’ll start with a simple enum that defines a named list of items. Then we’ll look at structures and unions, which hold values of different types, accessed by name (unlike arrays, which contain values of a single type accessed by number or index). To make a custom data type, we’ll combine enums, structures, and unions. In addition, we’ll explore how structures are used in embedded programming. Finally, we’ll take a look at typedef, which allows us to define our own data type from existing types.
An enumerated type, or ...
Read now
Unlock full access