The sizeof
operator in C returns the size, in bytes, of its operand. The result of sizeof
is of the unsigned integral type, which is usually denoted by size_t
. The operand can be any data type, including primitive types such as integer and floating-point types, pointer types, or compound datatypes such as structures and unions. When sizeof
is applied to the name of a static array (not allocated through malloc
, calloc
, or realloc
), the result is the size in bytes of the whole array. However, when sizeof
is used with a function, it returns the size of the return type from that function.
what type of value does sizeof return
