Size of
The sizeof() operator evaluates to the size of a type in bytes. The sizeof operator (without the parentheses) evaluates to the size of a variable, object or expression in bytes. For example,
/* Type Sizes |
|
Note that sizeof() takes a type, while sizeof takes a variable, object or expression. With some compilers, the two operators are interchangeable.
int type
An int type occupies one word of memory. One word is typically the size of a CPU register, making the int type the optimally efficient type. On 32-bit platforms, one word spans 4 bytes:
No comments:
Post a Comment