Pointer Swap
Create a function named swapPointers
that takes in two integer pointer references as arguments and swaps the addresses the pointers were assigned.
Use the following incomplete function definition:
void swapPointers(int *&ptr1, int *&ptr2) {
// ...
}
- Previous
- Next