Chapter 4: Using Variables and Assignments
Programs manipulate data values. Whether a program performs a single calculation, such as, say, converting a temperature value from Fahrenheit into Celsius, reads data only to display it, or performs much more complex calculations and interactions, the values a program manipulates must be both accessible and assignable. Accessible means that a value must reside somewhere in computer memory and should be retrievable. Assignable means that a given value, or the result of a calculation, must be stored somewhere in computer memory to be retrieved and/or changed later. Each value that can be accessed and assigned has a data type and a named location where it is stored. These can either be variables or constants.
Variables, or non-constant variables, hold values that are accessible and assignable. Their values may change during the execution of the program. Constant variables are variables that don't change ...