If pointers simply hold memory addresses, why do they have different types? Isn’t a memory address just a memory address? Usually, yes, an address is simply an address on a modern architecture, but the language standard doesn’t guarantee it. Pointers to different types are allowed to have different representations if the underlying hardware requires it (with a few rules for how you can convert between them), and you should be careful with assuming that they hold the same kinds of addresses.
Even if a pointer merely holds an address, and all addresses are equal, there are still at least three ...