// Declare variables with the most restrictive scope possible. Global // variables are worst, function scope is ok, more restricted local scope // is best. Global constants aren’t so bad, however. int alpha; // alpha has global scope, static duration void foo(int beta) { // beta’s scope is just this function int gamma; // gamma’s scope is just this function } int main() { int delta = 3; // delta’s scope is main() if (delta == 4) { int epsilon; // epsilon’s scope is just the body of the if } { // block created only for scope purposes int zeta; // zeta’s scope is just this small block } int alpha; // legal but insane: there’s a global alpha return 0; }