Step Into C · Lesson 12 · Modeling Data
Structs
Grouping data, . and ->, padding and alignment, arrays of structs.
- ~30 minreading and coding
- 4missions
- membersaccess
- Clanguage
Part of Step Into C. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.
A struct bundles several variables, called members or fields, into one type:
In this lesson
- Grouping related data
- Pointers to structs and the arrow operator
- Memory layout, padding and alignment
- Copying and comparing
- Arrays of structs
- Structs on the heap
Missions
- A point
- Move it
- Mind the gap
- Biggest file