C++ Variable Scope

C++ Variable Scope

A scope is a region of the program and broadly speaking there are three places where variables can be declared:

ยท        Inside a function or a block which is called local variables,

ยท        In the definition of function parameters which is called formal parameters.

ยท        Outside of all functions which is called global variables.