scan numbers into array c

#include <stdio.h>

int main() {
    int size;
    printf("Enter the size of the array: ");
    scanf("%d", &size);

    int arr[size];
    printf("Enter %d numbers:\n", size);

    for (int i = 0; i < size; i++) {
        scanf("%d", &arr[i]);
    }

    printf("The numbers entered are:\n");
    for (int i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }

    return 0;
}

Note: This code snippet scans numbers into an array in C. It prompts the user to enter the size of the array and then prompts the user to enter the numbers. It then prints the entered numbers.