Pointers:
Chapter 10:
Ms. Munazza Mah Jabeen
Assistant Professor of Computer Science
Pointers:
Pointer are Used for:
• Accessing array elements
• Passing arguments to a function when the function needs to
modify the original argument
• Passing arrays and strings to functions
• Obtaining memory from the system
• Creating data structures such as linked lists
Addresses and Pointers:
• Pointer Constants
• Pointers Variable
• The Address-of Operator &
Pointer Variable:
• Syntax Quibbles
• Pointers Must Have a Value
• Accessing the Variable Pointed To
• * - dereference operator /indirection operator
• Pointer to void
• Pointer to wrong type
• Pointer Constants and Pointer
Variables
Pointers and Arrays:
Pointers and Functions:
• Passing Simple Variables
• Passing Arrays
Array Sorting:
Pointers and C-Type Strings:
• Pointers and C-Type Strings
• Copying a String Using Pointers
• Library String Functions
• Memory Management: new and
delete
Pointers to Pointers:

Pointers