Mask-group

Accessing Structure Elements



  • Structures use a dot (.) operator to access its individual elements.

  • Note that before the dot there must always be a structure variable and after the dot there must always be a structure element. 

  • Structure elements can be accessed through a pointer to a structure using the arrow (->) operator.  

  • Whatever be the elements of a structure, they are always stored in contiguous memory locations.