Which of the following of the following is a true statement about a stack and heap?

Which of the following of the following is a true statement about a stack and heap?

Question:

Which of the following of the following is a true statement about a stack and heap?

Options:

Heaps can allocate a block of memory at any time and free it at any time.

Stacks can allocate a block of memory at any time and free it at any time.

Heaps are best for when you know exactly how much memory you should use.

Stacks are best when you don’t know how much memory to use.

Correct Answer

The Correct Answer for this Question is

Heaps can allocate a block of memory at any time and free it at any time.

Leave a Comment