The "sizeof" Operator
You can use the sizeof
operator to obtain the size (in bytes) of the data type of its operand. The operand may be an actual type specifier (such as int
or date
), as well as any valid expression. If the parameter is type of string, you can also use strlen
function. Here are some examples:
The result of the sizeof
operator is of type int
.
Last updated
Was this helpful?