int fish = 5;
int dog = 6;
int *fptr = &fish;
int *dptr = &dog;
exchange the values between fish and dog
Example: how to find the first vowel in a string
In future years, give them a lab where they have to call a function that requires a pointer
Back to top