147k views
3 votes
What opeartions will acquire memory from heap? Select all that apply. Group of answer choices malloc new free declaraion

User Libbie
by
5.4k points

1 Answer

6 votes

Answer:

malloc, new

Step-by-step explanation:

Heap memory is that part of the memory which is allocated to the JVM and it is shared by all the executing threads in the application. This memory is used by the programming languages to store the global variables. All the global variables are stored in the heap memory by default. This memory is also known as the dynamic memory.

In C programming, the library function, malloc is mainly used to allocate the block of the memory on the heap.

The new operation also acquires memory form the heap.

Thus, the answer is 'malloc' and 'new'.

User Pathead
by
5.7k points