Dynamic Memory


  1. Which option is best to eliminate the memory problem?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Virtual destructor means is that the object is destructed in reverse order in which it was constructed and the smart pointer will delete the object from memory when the object goes out of scope.


  1. What is the size of the heap?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Size of the heap memory is limited by the size of the RAM and the swap memory.



  1. Which is used to pass the large objects in c++?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Because by using pass by reference we need to pass only address location, So it can save a lot of memory.


  1. Which is used to allocate and deallocate storage for objects during the execution?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Free store is a pool of memory available for you to allocate and deallocate storage for objects during the execution of your program.



  1. How can object be allocated outside the object lifetime?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    void*