MCQs
Because by using pass by reference we need to pass only address location, So it can save
In virtual memory, We can keep track of all the objects and access them much faster than
any another.
None.
None.
Explanation: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.
None.
As we are passing the object without any attributes it will return as X::X().
Output:
$ g++ large.cpp
$ a.out
X::X()
when you allocate memory from the heap, you must remember to clean up objects when you're
done! Failure to do so is called a memory leak.
None.
Because vector is mainly used to store large objects for game
programming and other operations etc.