Skip to content

Latest commit

 

History

History
5 lines (4 loc) · 444 Bytes

File metadata and controls

5 lines (4 loc) · 444 Bytes

Scope

Variables have scope, i.e. they only exist for the length of the code block they are in. It is possible to declare them to behave in a different way with certain keywords:

  • extern: Variable will persist throughout the entire execution of the program, including between different files, it becomes a global variable
  • static: Variable that will keep its value throughout function calls, useful as incrementing variable (?)