Local Variables (Cont.) Consider the following code: int foo() { int numbers[2]; int j; j = 2; printf("j - %d\n", j); numbers[2] = 3; printf("j - %d\n", j); } We first assign '2' to 'j' and thus print the number '2'. Then we try to assign a value to 'numbers[2]' - which is out of range for this array. This will write just past 'numbers[]' - which is where 'j' is stored, and thus 'j' will accidentally get the value '3', which will be our next printed output. Note: local variables (and parameters) might be stored in registers, due to optimizations. Such variables, ofcourse, cannot be accidentally over-written by stack-related pointer errors.