Scope Resolution Operator ( :: )

Visibility or availability of a variable in a program is called as scope. There are two types of scope in c++ programs. Local scope Global scope Local scope: visibility of a variable is local to the function in which it is declared. Global scope: visibility of a variable to all functions of a program. Scope resolution operator in “::” is used to access global variables if same variables are declared as local and global. Block2 contained in block l .Note that declaration in an inner block hides a declaration of…

Read More