Variable and Scope

Scope rules

Scope of an object is defined as the region or a boundary of the program in which an object is visible.
Object can be variable of function prototypes.

Types of Scope

The External objects may be external variables or external function. The external variables are the variables that are defined outside any function they are available to all function. The function in c are always external function.
Note:- C does not allow function to be defined inside other function means nested function does not allow.
int sum():-

int a,b;  

 void main()
   int x , y;

    s=x + y;
    su=a + b;