Scope, Lifetime, and More on Functions

I. Scope and Lifetime

A. Scope of Identifiers

B. Scope Rules

C. Variable Declarations and Definitions

D. Lifetime of a Variable

1. Initializations in Declarations

II. Interface Design

A. Side Effects

B. Global Constants

III. Value-Retuming Functions

A. May We Introduce: Ada Lovelace

B. Boolean Functions

C. Matters of Style: Naming Value-Returning Functions

D. Interface Design and Side Effects

E. Background Information: Ignoring a Function Value

F. When to Use Value-Returning Functions

IV. Testing and Debugging

A. Stubs and Drivers

B. Testing and Debugging Hints

V. Summary