0
What is the scope of a variable ????
Please give an example of each !!!!
1 ответ
+ 4
Scope generally refers to the program-region within which a variable is accessible. The broad rule is a variable is accessible within the set of braces it is declared in. For example:
{
int a;
/* a would be accessible as long its
block(pair of matching braces) is not closed */
}
// using variable a here would give error