One of the main advantage of std::array as compared to C style array is that we can check the size of the array using size() member function
std::array
C
size()
int main() { std::array<int, 3> arr = { 1, 2, 3 }; cout << arr.size() << endl; }