Vidyalelo
Data Structure · Q29

Arrays in Data Structures

Programming · Data Structure · question 29

Q29

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

A.
int* array = new int[size];
Answer
B.
int array = new int[size];
C.
int array[size];
D.
int* array = malloc(size * sizeof(int));

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board