<< is effectively shorthand for a function, operator<< that accepts a char pointer.
There are many other versions of the same function that accept other kinds of parameter.
It was decided, when creating C++, that the operator<< here that accepts a char pointer will NOT output the value of the char pointer, but will instead output the character it's pointing at, and all the subsequent characters in memory until it hits a zero.
This was a deliberate choice, because it's so common to want to output an array of characters that has a zero on the end of it, because in C that's what a string is, and you keep track of them by holding onto a pointer to the first character.
Note that when you do this: cout << d you've got a problem because d is a pointer to a char that does NOT have a zero right after it, so you're going to keep reading whatever memory is after that char and outputting it. Might be nonsense, might be some other variable, might just crash.
Just cast b d to say long int (or long long int for x64). It will then display the address. You might want to also use std::hex to get the address display in hex rather than decimal.