Structs Preparation
Overview
C doesn’t have classes, but it does have structs! Today, we’ll be focusing on these pseudo-classes, how we can use them, and what they tell us about memory organization.
Basic Learning Objectives
Before class, you should be able to:
- Define a 
structin C - Explain how a 
structdiffers from a traditional class - Explain how a 
structdiffers from an array 
Advanced Learning Objectives
After class, you should be able to:
- Explain how 
structs are represented in memory - Demonstrate how complex elements (e.g. structs with nested arrays) of an array are stored in memory
 - Identify when padding will be necessary for a struct in memory
 
Resources
Read the following:
- DIS 1.6 Struct Syntax
 - DIS 2.7 Structs in Memory - Again, don’t worry about 
mallocand dynamic memory just yet (soon!) 
Checks
Submit you answer to the following on Moodle.
- 
    
What is the
structdefinition that will result in the following memory diagram?