Practice ยท 1 of 1
Swap Two Variables
Implement swapThem(a, b) so that after it runs, a holds the old b and vice versa. (Yes, std::swap exists โ write it by hand once so you feel the assignment semantics.)
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Variables Practice