Scope is a compile-time property: the region of program TEXT in which an identifier's declaration is visible. C has four kinds of scope. Function prototype scope covers parameter names in a prototype that is not a definition. Function scope applies only to goto labels. The two that matter for tracing programs are the other two.
Block scope: a variable declared inside { } (a function body or any nested block, including the body of a for, if or while) is visible from its declaration to the end of that block. If it is auto, its storage is created fresh on each entry to the block.
File scope: a variable or function declared outside every function body is visible from its declaration to the end of that source file. If it has external linkage (the default, unless declared static), another file can refer to the same object through its own extern declaration.
Static vs dynamic scoping. Under static (lexical) scoping, which C uses, a free variable in a function (one not declared in it) refers to the declaration that encloses the function's TEXT. Under dynamic scoping, the same variable refers to the most recent binding still active on the CALL stack: the callee searches its caller, then the caller's caller, and so on. Pseudo-code questions sometimes ask for the output under both rules.