How the memory management in vectors are being done. What
happens when the heap memory is full, and how do you handle it ?
No Answer is Posted For this Question
Be the First to Post Answer
class Foo { public: Foo(int i) { } }; class Bar : virtual Foo { public: Bar() { } }; Bar b; Referring to the above code, when the object 'b' is defined, a compiler error will occur. What action fixes the compiler error? a) Adding a virtual destructor to the class Bar b) Adding a constructor to Bar which takes an int parameter c) Adding "Foo()" to the Bar constructor d) Adding a copy constructor to the class Foo e) Adding "Foo(0)" to the Bar::Bar initializer list
What are pointer-to-members in C++? Give their syntax.
How to implement flags?
Describe run-time type identification?
What is an adjust field format flag?
Write a note about the virtual member function?
What is the difference between public, private, and protected access?
What is a float in c++?
If a base class is an adt, and it has three pure virtual functions, how many of these functions must be overridden in its derived classes?
In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest.
When do we run a shell in the unix system?
Explain the concept of memory leak?