3 ms·
Pointers are hardly even required to have a bit representation at all! [1] This is one of the most common impedance mismatches between programmers and the C sp
by Too 5y ago
Pointers are hardly even required to have a bit representation at all! [1]
This is one of the most common impedance mismatches between programmers and the C spec. C does not mention how the machine should handle memory. Variables and pointers are just abstract constructs there. While many programmers think their programs are a giant char* on their DRAM stick that can be fiddled with at any time and in any way they please.
([1] Actually this is not entirely true but it is better to think of them this way for the sake of not making more assumptions on the memory which are UB. Pointers are allowed to be converted to integer types - but with the caveat that alot of behaviour around it is implementation defined and of course surrounded with a big dose of UB as well!)