How do you dynamically allocate memory for an array in C++ using pointers?
int arr[10];
int *arr = new int[10];
int *arr = malloc(10 * sizeof(int));
int *arr = int[10];
This question is part of this quiz :