Practice ยท 2 of 3
Swap with a Temp
Implement void swap(int* a, int* b) that exchanges the two ints through the pointers using a temporary. (Full pointer theory comes in module 11; for now the pattern *a means "the int a points at".)
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Value Surgery