Guess the output?
All statement in program, except the following lines is fine in the program.
So, what is the problem in above lines?
myGlobalVar is not defined rather only it is only declared.
Following statement only declares the variable.
To declare and define the variable following statement has to be used or declare the variable again like I did for myGlobalVar2.