Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: Thursday, June 13, 2019
 
 

offsetof(3C)

Name

offsetof - offset of structure member

Synopsis

#include <stddef.h>

size_t offsetof(type, member-designator);

Description

The offsetof() macro defined in <stddef.h> expands to an integral constant expression that has type size_t. The value of this expression is the offset in bytes to the structure member (designated by member-designator) from the beginning of its structure (designated by type).

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
MT-Level
MT-Safe

See Also

attributes(7)