Saturday, May 10, 2008

Size of operator

Size of operator

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:

Copyright

Copyright © 2008 C Tutorial, All rights are reserved