Variables and Constants
Variables: data values (stored in RAM) which can change during the execution of a program.
Constants: do not change their values during program execution
Examples:
- Variables: number of times key is pressed on keyboard, name of a file to process, discount on a purchase, middle initial of a customer, whether or not disk is write protected, names and addresses of Noble prize winners, etc.
- Constants: value for “false”, pi, best grade in this cllass.