The <stddef.h> Header File

ANSI definitions of default macros and types

Functions

offsetof
Returns the offset of a member in a structure.

Constants

NULL
A null-pointer value.

Predefined Types

size_t
A type to define sizes of strings and memory blocks.

offsetof

#define offsetof(type,member) ((unsigned long) &(((type*)0)->member))

Returns the offset of a member in a structure.

offsetof is a macro which returns the offset of a member in a structure type. The type can either be defined through typedef, or preceded by struct, as usual.

Deprecated alias: OFFSETOF

See also: sizeof, typeof


size_t

typedef unsigned long size_t;

A type to define sizes of strings and memory blocks.

size_t is a type proposed by ANSI C for defining sizes of strings and memory blocks.


Return to the main index