CHTP5e_07-Pointers 1
CHTP5e_07-Pointers 1
7
C Pointers
2
7.1 Introduction
7.2 Pointer Variable Definitions and Initialization
7.3 Pointer Operators
7.4 Passing Arguments to Functions by Reference
7.5 Using the const Qualifier with Pointers
7.6 Bubble Sort Using Call-by-Reference
7.7 sizeof Operator
7.8 Pointer Expressions and Pointer Arithmetic
7.9 Relationship between Pointers and Arrays
7.10 Arrays of Pointers
7.11 Case Study: Card Shuffling and Dealing Simulation
7.12 Pointers to Functions
3
7.1 Introduction
Pointers
• Powerful, but difficult to master
• Simulate call-by-reference
• Close relationship with arrays and strings
4
Error-Prevention Tip
The value of a is 7
The value of *aPtr is 7
Error-Prevention Tip