Concept Flow - Structure vs union comparison
Declare struct with multiple members
Memory allocated = sum of all members' sizes
Each member has its own memory space
Declare union with multiple members
Memory allocated = size of largest member
All members share the same memory space
Assign value to one union member
Reading other union members shows overlapping data
Structures allocate separate memory for each member, unions share the same memory for all members.