The sizeof compile-time operator returns the length (in bytes) of the variable or type it precedes. If it precedes a type, that type must be enclosed in parentheses. If it precedes a variable, the parentheses are optional. For example, given

int i; cout << sizeof(int); cout << sizeof i;

both output statements will print 4 in most 32-bit environments.

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: