CPP

CPP

Large Objects has 9 Questions
Which container in c++ will take large objects?

string
class
vector
None of the mentioned
How to stop your program from eating so much ram?

Find a way to work with the data one at a time.
Declare it in program memory, instead of on the stack.
Use the hard drive, instead of RAM.
All of the mentioned
Which option is best to eliminate the memory problem?

use smart pointers
use raw pointers
use virtual destructor
both a & c
What is the size of the heap?

10MB
500MB
1GB
Size of the heap memory is limited by the size of the RAM and the swap memory
How to unlimit the size of the stack?

setrlimit()
unlimit()
both a & b
None of the mentioned
In linux, how does the heaps and stacks are managed?

ram
secondary memory
virtual memory
None of the mentioned
Which is used to pass the large objects in c++?

pass by value
pass by reference
both a & b
None of the mentioned
How to store the large objects in c++ if it extents its allocated memory?

memory heap
stack
queue
None of the mentioned
When we are using heap operations what do we need to do to save the memory?

rename the objects
delete the objects after processing
both a & b
None of the mentioned