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 |
Explain the concept of inheritance in C++.
What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00
program to print this triangle * * * * * *
What are all predefined data types in c++?
Which function should be used to free the memory allocated by calloc()?
What is class in c++ with example?
Explain the difference between static and dynamic binding of functions?
What is the difference between a reference and a pointer?
List out some of the OODBMS available?
Given the following function definition: int doit(int &x, int y, int &z) { x = 3*x; y = y + 5; z = x+y; return z - 4; } int a = 5, b = 7, c = 9, d = 11; d = doit(a,b,c);
Does std endl flush?
reading material is provided 3 books for c++ if u need more do let me know thnx i hve lots of material do let me know if u want it