📅  最后修改于: 2020-12-19 06:09:16             🧑  作者: Mango
stddef.h标头定义了各种变量类型和宏。其中许多定义也出现在其他标题中。
以下是标头stddef.h中定义的变量类型-
Sr.No. | Variable & Description |
---|---|
1 |
ptrdiff_t This is the signed integral type and is the result of subtracting two pointers. |
2 |
size_t This is the unsigned integral type and is the result of the sizeof keyword. |
3 |
wchar_t This is an integral type of the size of a wide character constant. |
以下是标头stddef.h中定义的宏-
Sr.No. | Macro & Description |
---|---|
1 |
NULL
This macro is the value of a null pointer constant. |
2 |
offsetof(type, member-designator)
This results in a constant integer of type size_t which is the offset in bytes of a structure member from the beginning of the structure. The member is given by member-designator, and the name of the structure is given in type. |