Check out example codes for "insert elements in array in c++11". It will help you in understanding the concepts better.

Code Example 1

int main() {
    int array[10];
    for(int &i : array){
        std::cin >> i;
    }
}

Learn ReactJs, React Native from akashmittal.com