Chapter 2
Chapter 2
Using Data
Declaring and Using Constants and
Variables (cont’d.)
• Variable
– A named memory location
– Used to store a value
– Can hold only one value at a time
– Its value can change
• Data type
– A type of data that can be stored
– How much memory an item occupies
– What types of operations can be performed on data