At the assembly level, the structure is reduced to the address to which the offset corresponding to the structure member refers.
Depending on the alignment rule and the memory of the memory class, for example, a structure is allocated.
Example:
struct A { int a, char b }a1;
In the above case, if you write a1.b = 5 , its build equivalent would be something:
MOV 5 TO ADDRESS OF a1 + 4 // if the integer size is 4
source share