This program illustrates the swap() member function for vector objects. Press Enter to continue ... For v1 we have: Size = 5 Capacity = 5 Contents: 5 5 5 5 5 Press Enter to continue ... For v2 we have: Size = 10 Capacity = 10 Contents: 10 10 10 10 10 10 10 10 10 10 Press Enter to continue ... Now we swap v1 and v2 with v1.swap(v2) and redisplay. Press Enter to continue ... For v1 we have: Size = 10 Capacity = 10 Contents: 10 10 10 10 10 10 10 10 10 10 Press Enter to continue ... For v2 we have: Size = 5 Capacity = 5 Contents: 5 5 5 5 5 Press Enter to continue ... Now we change the capacities and swap again with the following code sequence to observe how the capacities are "carried along" during the swap: v1.reserve(12); v2.reserve(7); v2.swap(v1); Press Enter to continue ... For v1 we have: Size = 5 Capacity = 7 Contents: 5 5 5 5 5 Press Enter to continue ... For v2 we have: Size = 10 Capacity = 12 Contents: 10 10 10 10 10 10 10 10 10 10 Press Enter to continue ...