Lesson 078

Memory & Pointers

Addresses · & and * · Dereferencing

1:00

How programs point to data in memory — addresses, the & and * operators, pass-by-pointer, and the null/dangling/wild pitfalls.

By the end, you can

  • Explain what a memory address is and why each variable has one.
  • Distinguish a pointer from the data it points to.
  • Use `&` to obtain an address and `*` to follow one (read or write).
  • Trace what happens when a function receives and writes through a pointer parameter.
  • State the size of a pointer on a 64-bit machine and explain why it is constant.
  • Identify and distinguish null, dangling, and wild pointers by their defining symptoms.
  • Apply the fix for each pointer pitfall (NULL check, set-to-NULL after free, initialize before use).
Up next in Math, Memory & Files
Questions or feedback?