Visibility determines where a C identifier can be referred to by name. It begins at the declaration and ends with the identifier’s scope. A declaration inside a block therefore has block scope; a declaration outside such a block can have file scope. Visibility is not the same as access to the object: an object may remain usable through a pointer or another visible declaration even when its original name is hidden. section 2.2 section 13.2
Shadowing changes which name is visible
In Listing 13.1, `double x` becomes visible at its declaration and remains visible through `main`, except inside the nested block after `int x = 0`. The inner `x` shadows the outer identifier. `squareIt(&x)` before the declaration of the inner variable refers to the `double`; `squareIt(xp)` still modifies that same `double` through the pointer; and `squareIt(&x)` after the block again refers to the outer variable. section 13.2
TAKEAWAYS
- Identifiers are visible only inside their scope, beginning at their declaration. section 13.2
- An identifier of the same name in a subordinate scope can shadow an outer identifier. section 13.2
- Each variable definition creates a new object, although an `extern` declaration can introduce a name for an existing object. section 13.2







