November 2001
Beginner
1128 pages
29h 12m
English
Programs typically need to store information—perhaps the current price of IBM stock, the average humidity in New York City in August, the most common letter in the Constitution and its relative frequency, or the number of available Elvis imitators. To store an item of information in a computer, the program must keep track of three fundamental properties:
Where the information is stored
What value is kept there
What kind of information is stored
The strategy the examples have been using so far is to declare a variable. The type used in the declaration describes the kind of information, and the variable name represents the value symbolically. For example, suppose Chief Lab Assistant Igor uses the following statements:
int braincount; ...