The size of operator returns a number of bytes the
operand occupies in memory. The operand may be a variable,
a constant or a data type qualifier. It is a
compile time operator.
An example of size of
Output of size of operator:
The output of the above program is 2 because int occupies two byte in memory.
The size of operator is generally used to determine the
length of entities called arrays and
structures when their size is not known to the programmer.
0 comments:
Post a Comment