Load the code into a compiler, compile and then use the debugger to trace through the code to understand what's going on. Once you're done that and you then find a particular statement for which you don't understand what is happening, then ask a specific C++ question.
#include <iostream>
#include <iomanip>
#include <array>
#include <stdexcept> // for out_of_range exception class
usingnamespace std;
int main()
{
const size_t SIZE{7};
array<int, SIZE> integers1{0}; // 7-element array< int >
array<int, SIZE> integers2{0}; // 7-element array< int >
// NOTE: We changed integers2 to 7 elements so that operators
// like == can be used to compare array objects.
// print integers1 size and contents
cout << "Size of array integers1 is " << integers1.size()
<< "\narray after initialization: ";
for (int item : integers1) {
cout << item << " ";
}
cout << endl;
}
Note that your code has comments that tell meaning of some statements.