refers to where variables is declared.
It can be Inside a function or a block which is called local variables, In the definition of function parameters which is called formal parameters or Outside of all functions which is called global variables.
Global variable are declared outside any functions, usually at top of program. they can be used by later blocks of code:
int g; //global
g = 0;
Variables that are declared inside a function or block are local variables.The scope of local variables will be within the function only.These variables are declared within the function and can’t be accessed outside the function.
int g; //local
cout << g;