Pointer
A pointer is a variable that stores a memory address, accessing the pointed-to memory through dereferencing — the core of low-level memory operations in C/C++.
Purpose
Understand the memory model and low-level operations, managing direct memory access.
Mechanism
A pointer stores an address; *p dereferences to access the value; &x takes an address. Pointer arithmetic moves to adjacent memory. The null pointer NULL points to no valid memory. Smart pointers (Rust/C++) manage lifetimes automatically.
Use cases
- C/C++ programming
- Memory management
- Low-level optimization