Beginner C++
Q10 / 100

Which keyword allocates memory on the heap in C++?

Correct! Well done.

Incorrect.

The correct answer is D) new

D

Correct Answer

new

Explanation

new allocates memory and calls the constructor. The memory must be freed with delete (or delete[] for arrays).

Progress
10/100