Although sizeof is also a keyword, it is a compile-time operator that determines the size, in bytes, of a variable or data type, including classes, structures, and unions. If used with a type, the type name must be enclosed by parentheses.

For most 32-bit compilers, the following example prints the number 4:

int x; cout << sizeof x;

For C99, sizeof is evaluated at runtime when it is applied to a variable-length array.

C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539 © 2008-2017.
If you may any questions please contact us: