C - Global variables

From EdWiki

Global variables

  • Any variable which is defined outside of any function is called a global variable.
  • Global variables remain in existence through out the life of the program.
  • Any function may access the global variable(s)
  • Global variable(s) can be made accessible to other source files by an external linkage.
  • Global variable(s) provide an alternative to functions arguments and return values for communicating data between functions.