> 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.
>This depends on the compiler as well as the processor. Yes. On x64 compilers targeting 64bit cpus, the following prints 8 instead of 4: #include int main () { std::cout
An 'int' is usually 4 bytes wide when compiling for 64-bit ISAs (at least I haven't seen situations yet where this isn't the case, my experience is limited to x86 and ARM though). Modern C fixes this ambiguity with sized integer types (e.g. int32_t vs int64_t).