size() – size of array

The following code example determines the size of an array.

#include <iostream>
#include <array>
using namespace std;

int main() {
    array<int, 9> myArray[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};

    cout << "size of array is: " << myArray->size() << endl;

    return 0;
}
Output
size of array is: 9