Examveda

How do you dynamically allocate an array in C++?

A. int* array = new int[size];

B. int array = new int[size];

C. int array[size];

D. int* array = malloc(size * sizeof(int));

Answer: Option A


This Question Belongs to Data Structure >> Arrays In Data Structures

Join The Discussion

Related Questions on Arrays in Data Structures