sizeof Operator


Syntax

sizeof  prefix_expression
sizeof(type_name)

Notes

The type of the value returned by the sizeof operator is size_t, which is defined in the header stddef.h. For the currently supported compilers, size_t is of type unsigned integer. The sizeof operator may be applied to a parenthesised type name or to an expression (which is not evaluated). It returns the size of the object. The base unit of measurement is the size of the type char, noting that by definition, sizeof(char) = 1.

The following is true of the sizeof operator:

The sizeof operator may not be applied to: