1.

How to protect the heap from affecting the memory?(a) Avoid using pointers for associating two data structures(b) Embed pointed child objects into the parent object(c) Allocate objects in chunks(d) All of the mentionedThis question was posed to me in homework.Question is from Heaps in chapter Algorithms, Objects & Iterators in C++ of C++

Answer»

The correct option is (d) All of the mentioned

For explanation: STEPS to protect the heap from affecting the memory.

-> Avoid using POINTERS for associating two data structures

-> Embed pointed child OBJECTS into the PARENT OBJECT

-> Allocate objects in chunks.



Discussion

No Comment Found

Related InterviewSolutions