/** Example showing local variable lifetime. */ #include using namespace std; void ninetynine(); int main() { ninetynine(); // ... do some other stuff ... // return 0; } void ninetynine() { int localVar = 99; // localVar is destroyed at end of fcn call cout << localVar << endl; }