What would new int[3] do to the int pointer?

I was looking for uses for pointers and this turned out to be one of them. Dynamically allocating memmory. I am a little confused with the keyword new, and when adding [number] in the end. new int[3]. I do understand that this question might be bad. I’m only 13.

   #include <iostream>
    using namespace std;
    int main() {
        int* scores;
        cout << "Enter top 3 scores: ";
        //dynamically allocate memory
        scores = new int[3];
        for (int i = 0; i < 3; i++) {
            "Enter score: ";
            cin >> scores[i];
        cout << endl << "Scores are: ";
        for (int i = 0; i < 3; i++) {
            cout << scores[i] << " ";
        delete[] scores;
        return 0;


A pointer is basically a variable pointing to a specific address in memory. An array is a group of variables allocated consecutively in memory. When you write scores = new int[3] you allocate a memory for three int-type variables and make the scores variable reference the first one’s address. Now, when referencing the array fields: scores[i], you take the address of the first field of the array and you add the variable i, giving you the address of the ith element.