Commentary below slide.
|
|
Slide 10 of 111
Notes:
The program begins by declaring two local variables. The statement char ch carves out memory for a char and names the memory location ch. The statement int code carves out memory for an int and names the memory location code. Future references in the program to ch and to code refer to these memory locations.
Are you guaranteed that code is initialized to 0?
Answer. No. Numeric class-wide variables are automatically initialized to 0. Local variables are not.