Programming: Creating a Global Variable

Positioning a variable or array outside of the main function allows this variable to be used within all functions. All variable positioned outside of the main function are called global variables and the scope of these variables are global, or able to be used anywhere in the program.



Back to blog

Leave a comment

Please note, comments need to be approved before they are published.