Can Virtual destructor is used in derived classes?What is the answer to the following question?Class Base {Public:Base();Virtual ~Base();};Class Derived : protected Base {Public:Virtual ~Derived();};Int
Latest Answer: Choice 4 A pointer to a Base class cannot point to an instance of a Derived class. class cannot point to an instance of a Derived class. This the the only truthful answer. ...
What Is The Difference Between Object and Instance?
Latest Answer: No difference,object is nothing but an instance of a class ...
Write a program to concatenate two circular linked lists into a single circular list.
Latest Answer: class node {public: node(int n) : m_n(n) { m_pNext = this; } ~node() {} void SetNext( node* p ) { m_pNext = p; } node* GetNext() const { return m_pNext; } int GetData() const { return m_n; } static ...
What is the danger of using public unsigned integers within a class?In a diamond-shaped inheritance hierarchy, how to ensure that only 1 copy of parent is created?
Latest Answer: There are at least 2 questions here. The latter is answered but not the former.If the initial question is answered, there would be a requirement to highlight what the dangers are for both public unsigned and multiple inheritance. ...
what is inheritance? why we use it? plzz can anybody explain me with one example and where we use that concept?
Latest Answer: The main use of inheritance is to provide reusability of codes .Through inheritance base class objects and functions are acquired by derived class so there is no need to specify it again in derived class ...
What does this function do:string f(const string &x) { return x.empty()? x : f(x.substr(1)) + x[0];}What does this piece of code perform:char *a=...., *b=....;while(*b++ = *a++);
Latest Answer: Second function is copying 'a' to 'b' provided that 'a' should be a null terminated string. ...
Latest Answer: Don't get confused with the words visual and ANSI. Follow this.* Visual C++ is an IDE for developing GUI real time applications using C++. Visual C++ deals with more complex applications* ANSI C++ is the developed version of C++'s earlier ...
what are the issue one should care implementing polymorphism.
Latest Answer: In regards to the point of static and dynamic binding, the virtual keyword needs to be used for any functions that need to be dynamically overriden and not statically overloaded. ...
Latest Answer: In 16 bit development environment like DOS or WIN 3.0 memory management is done in terms of segment:offset addressing style. so in this environment we have segment registers like CS,DS.SS,ES if we declare a near pointer we will be able to access the pointer ...
Latest Answer: Well, the basic answer is not possible to call copy constructor explicitly within a function again. Because, in the member function it tries to shadow the parameter which is defined at the caller side. Hence, we cannot invoke copy constructor ...
View page << Previous 1 2 3 4 [5] 6 7 8 9 10 Next >>

Go Top