How do you know the size of Structure Variables?


We may use the unary operator ‘sizeOf’ to tell us the size of a structure (or any variable). The expression:

SizeOf( struct x);

Will evaluate the number of bytes required to hold all the members of the structure x. If y is a simple structure variable of type struct x, then the expression

SizeOf(y);

would also give the same answer. However, if y is an array variable of type struct x,
then

sizeOf(y);

Would give the total number of bytes the array y requires.


Related

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item