Tagged: scope of variables

Scope of Local and Global Variables in C Programming 1

Scope of Local and Global Variables in C Programming

The scope of variables refers to that portion of the program where the variables can be accessed. They are accessible in some portion of the program and in the other they are not accessible. Scope of a variable defines the portion of the program in which the set of variables can be referenced and manipulated. When a variable is required in a program, it can be declared as: Local variable Global variable Local Variables in C Programming Language The variables that are declared inside a function are called as local variables The scope is only within the function in which...