1. Introduction
Pointers and memory
Pointer size and types
Pointer operators
Common uses of pointers
Summary
2. Dynamic memory management in C
Dynamic memory allocation
Dynamic memory allocation functions
Deallocating memory using the free function
Dangling pointers
Dynamic memory allocation technologies
Summary
3. Pointers and functions
Program stack and heap
Passing and returning by pointer
Function pointers
Summary
4. Pointers and arrays
Quick review of arrays
Pointer notation and arrays
Using malloc to create a one-dimensional array
Using the realloc function to resize an array
Passing a one-dimensional array
Using a one-dimensional array of pointers
Pointers and multidimensional arrays
Passing a multidimensional array
Dynamically allocating a two-dimensional array
Jagged arrays and pointers
Summary
5. Pointers and strings
String fundamentals
Standard string operations
Passing strings
Returning strings
Function pointers and strings
Summary
6. Pointers and structures
Introduction
Structure deallocation issues
Avoiding malloc/free overhead
Using pointers to support data structures
7. Security issues and the improper use of pointers
Pointer declaration and initialization
Pointer usage issues
Memory deallocation issues
Using static analysis tools
Summary
8. Odds and ends
Casting pointers
Aliasing, strict aliasing, and the restrict keyword
Threads and pointers
Object-oriented techniques
Summary
Index