1offsetof(3C) Standard C Library Functions offsetof(3C)
2
3
4
6 offsetof - offset of structure member
7
9 #include <stddef.h>
10
11 size_t offsetof(type, member-designator);
12
13
15 The offsetof() macro defined in <stddef.h> expands to an integral con‐
16 stant expression that has type size_t. The value of this expression is
17 the offset in bytes to the structure member (designated by member-des‐
18 ignator) from the beginning of its structure (designated by type).
19
21 See attributes(5) for descriptions of the following attributes:
22
23
24
25
26 ┌─────────────────────────────┬─────────────────────────────┐
27 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
28 ├─────────────────────────────┼─────────────────────────────┤
29 │MT-Level │MT-Safe │
30 └─────────────────────────────┴─────────────────────────────┘
31
33 attributes(5)
34
35
36
37SunOS 5.11 29 Dec 1996 offsetof(3C)