|
|
|
|
|
by ChrisSD
2104 days ago
|
|
> A pointer is a memory address. This is an amazingly wrong statement. In assembly you deal with memory addresses. Pointers in C are a much higher level abstraction. > On current mainstream Intel processors, it occupies four bytes of memory (because an int is four bytes wide). This depends on the compiler as well as the processor. |
|
C11 6.5.3.2p3 “The unary & operator yields the address of its operand. If the operand has type ‘type’, the result has type ‘pointer to type’.”
I understand the intention to warn about the abstraction C introduces, but you’ve confused things.
Pointers and addresses are perfectly covered.
What you really want to bring is what the Standard calls the “C abstract machine”, for which the memory model can be surprising.