The output
The output produced by the program in Listing 1 is shown below:
In global main function. globalVariable = 0 globalVariable = 1 In classMain function. globalVariable = 1 globalVariable = 2 In doSomething function. globalVariable = 2 globalVariable = 3 Press any key to continue