Explain calling an object's member function(declared
virtual)from its constructor?
Answer / deepak
It will depend on when pointer to vtable is initialised.
generally if constructor is already defined compiler insert
code to initialise virtual table pointer as first statement
inside defined constructor. If vptr is initialised before
calling virtual function then it will be invoked, if vptr is
not initialised then it can crash.
Is This Answer Correct ? | 2 Yes | 1 No |
Define the process of handling in case of destructor failure?
What is the outcome of cout< a) 16 b) 17 c) 16.5
What is private, public and protected inheritance?
Why do we use string in c++?
What is encapsulation in c++?
Define a pdb file.
Is c++ vector dynamic?
What is the difference between multiple and multilevel inheritance in c++?
What is the output of printf("%d")?
58 Answers CTS, HCL, Infosys, TCS, Winit, Wipro,
Explain about Virtual Function in C++?
What do c++ programmers do?
Which software is used to run c++ program?