 <p>The lifetime of an automatic object ends at the end of the block where it is declared.</p> <p>Accessing an object outside of its lifetime is undefined behavior in C.</p> <blockquote> <p>(C99, 6.2.4p2) "If an object is referred to outside of its lifetime, the behavior is undefined. The value of a pointer becomes indeterminate when the object it points to reaches the end of its lifetime."</p> </blockquote>