The variable named globalVariable
A global variable named globalVariable is declared and initialized to a value of 0 in Listing 1.
This variable is accessed from three different locations in the program. The three locations are highlighted in boldface.
The current value is displayed each time the variable is accessed from a different location. Then the value is incremented by one and the value is displayed again.