November 2002
Beginner to intermediate
142 pages
4h 19m
English
Every variable must be declared before it can be used. The declaration determines the variable’s type, its storage class, and possibly its initial value. The type of a variable determines how much space it occupies in storage and how the bit pattern it stores is interpreted. For example:
float dollars = 2.5F; // a variable of type float
The variable dollars designates a region in memory
with a size of 4 bytes. The contents of these four bytes are
interpreted as a floating-point number, and initialized with the
value 2.5.
Read now
Unlock full access