C++ Pointers Quiz - Question 4

Last Updated :
Discuss
Comments

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];

Share your thoughts in the comments
Article Tags :