Pointers and Memory Management in C

The heart of C: addresses and pointers, pointer arithmetic, the stack and the heap, dynamic memory, common memory bugs and how to find them.

CPRG-110 Year 1 3 credits 12 lessons planned ▶ Video lessons coming soon

Offered by HSM University · C Programming

Course content

  1. 1Memory and addressesComing
  2. 2Pointers and indirectionComing
  3. 3Pointers and arraysComing
  4. 4Pointer arithmeticComing
  5. 5Pointers to pointersComing
  6. 6The stack and the heapComing
  7. 7Dynamic memory with malloc and freeComing
  8. 8Resizing with reallocComing
  9. 9Memory leaks and dangling pointersComing
  10. 10Function pointersComing
  11. 11Finding memory bugs with Valgrind and sanitizersComing
  12. 12Capstone: a dynamic array libraryComing

Requirements

Recommended background. You can start any course at any time.

Description

The heart of C: addresses and pointers, pointer arithmetic, the stack and the heap, dynamic memory, common memory bugs and how to find them.

Part of the Information Technology stream, typically taken in year 1.