- Function
Calculate the offset of a struct or union member.
- Header
- Declaration
size_t offsetof (type, member);
- Description
offsetof
calculates the address offset of astruct
orunion
member.- Limits
- The function is actually a macro.
- Availability
ISO 9899
- Example
None.