Skip to content
Mon, Oct 12, 2026 / Ideas for a clearer worldINDEPENDENT INSIGHTS · PRACTICAL TOOLS · EXPLAINERS
Sign in
C++ Programming / August 13, 2021

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.

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.