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 |
What is class in c++ with example?
write a program that will produce the ff. output. "what fruit will you buy? 1)apple 2)orange 3)mango ENTER CHOICE (1,2 or 3)> HOW MANY WILL YOU BUY?> THAT WILL COST XX.XX
Describe the main characteristics of static functions?
What is the difference between the compiler and the preprocessor?
Is there a new/delete equivalent of realloc?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
What is the default access level?
List out some of the object-oriented methodologies?
What is the difference between public, private, and protected access?
What is the function of I/O library in C++ ?
Explain the concept of copy constructor?
What is the difference between while and do while loop?