Thad said:
I expect it to be the same value that it was last assigned. Why do you
think it is indeterminate?
Perhaps because he has read the Standard. Specifically,
section 6.2.4 paragraph 2:
[...] The value of a pointer becomes indeterminate
when the object it points to reaches the end of
its lifetime.
Already I hear your plaintive cry: "Well, so, but why?"
On many machines, the value of a pointer is an address
and the value has meaning whether or not the memory at that
address is "occupied" by any of the program's objects. But
at a little more abstract level, the value of a pointer is
a reference to an object -- and if there is no object, there
can be no reference to it. A pointer that once pointed to an
object thus loses its value when the object ceases to exist.
Here is a pointer: "The last paragraph on the seventeenth
page of the fourth book on the fifth shelf in the second room
on the right as you come through the main entrance of the City
Library." It's a pointer because it's a reference, and using
the reference you can look up what it refers to.
Alas! The City is Alexandria and the Library was burned
multiple times by multiple conquerors many centuries ago. The
above is no longer a reference, but just a string of useless
words -- in fact, "valueless" words.
"514 Elm Street" looks like it might be an address, and
you might write it on an envelope. But if the space between
512 and 516 is a vacant lot, will the Post Office deliver
that letter? No: They will return it to you as undeliverable,
and might even mark it "No such address."
C's model of storage allows for addresses that carry more
"structure" than simple numbers. Most machines today do not
take advantage of this freedom, but who knows what will come
tomorrow? If tomorrow brings structured addresses, C will be
ready for them.