Ch. 4.15: More about Blocks and Variable Scope Flashcards
1
Q
What is the scope of a variable?
A
The scope of a variable is limited to the block in which it is defined.
2
Q
What is local or block scope?
A
Variables defined inside a set of braces have local scope or block scope.
3
Q
What does leaving or going out of scope mean?
A
The variable may no longer be used.