The page says "It is important to indicate that terry contains the value 1702, and not 'h' nor "hello", although 1702 indeed is the address of both of these."
I don't understand why then it outputs (Visual studios 2010)
TRUE.
hello
hello
Also. & the reference operator. Why does &terry[0] not output the memory address of where 'h' is stored, but instead hello?
If anyone could explain that to me, that would be great!
On line 2: both are pointer to the first element, so they're equal.
The reason why the string and not the address appears in the output lies in the nature of the stream (respectively the operator<<). if you provide a certain type (like const char*) it knows what to do: output the string (it assumes that the address points to a 0 terminated string).
if you write that:
cout << endl << (void *) terry;
the stream doesn't know anymore what to do with the data and prints the address.