# C_SIZEOF

Intrinsic Module Inquiry function (Generic): Returns the number of bytes of storage used by the argument. It cannot be passed as an actual argument.

## Module

USE, INTRINSIC :: ISO_C_BINDING

## Syntax

result = C_SIZEOF(x)

x | (Input) Is an interoperable data entity of any type and any rank. It must not be an assumed-size array or an assumed-rank array associated with an assumed-size array.

## Results

The result is a scalar of type INTEGER(4) on IA-32 architecture; INTEGER(8) on Intel® 64 architecture. If x is scalar, the result value is the size of x in bytes. If x is an array, the result value is the size of a single element of x multiplied by the number of elements in x.

## Example

Consider the following:

    INTEGER(4) :: S
    INTEGER(4) :: T(3)
    C_SIZEOF(S) ! has the value 4
    C_SIZEOF(T) ! has the value 12

Parent topic: C to D

## See Also

Intrinsic Modules
ISO_C_BINDING Module
SIZEOF