#include <iostream>
#include <array>
int main ()
{
std::array<int, 5> first = {1, 2, 3, 4, 5};
std::array<int, 5> second = {6, 7, 8, 9, 0};
first.swap(second);
for (int &n : first) std::cout << n << ", ";
std::cout << '\n';
for (int &n : second) std::cout << n << ", ";
return 0;
}
/*
run:
6, 7, 8, 9, 0,
1, 2, 3, 4, 5,
*/