Get size of a type

Syntax

int sizeof(typename)

 

Parameters

typename - name of user-defined type or intrinsic type.

 

Remarks

Returns size (number of bytes) of variables of typename. It is compile-time function.

 

Example

type POINT x y
int ts = sizeof(POINT)
 now ts is 8