Can we call a virtual function from a constructor?
You can call a virtual function in a constructor, but be careful. ... In a constructor, the virtual call mechanism is disabled because overriding from derived classes hasn't yet happened. Objects are constructed from the base up, “base before derived”.
| Is This Answer Correct ? | 0 Yes | 0 No |
When would you choose to return an error code rather than throw an exception?
Implement a 2D bit-matrix representing monochrome pixels which will have only OFF/ON values and will take on an average only one bit of memory for each stored bit. How to perform various operations on it?
Describe the different styles of function prototypes in C++.
Write a program to generate the Fibonocci Series in C++.
What are string library functions(syntax).
Tell us the size of a float variable.
What is Copy Constructor?
Write a program to input an integer from the keyboard and display on the screen “WELL DONE” that many times.
What does it mean to declare a member function as virtual in C++?
What are the advantages/disadvantages of using #define?
Is there a difference between class and struct?
What are the major differences between C and C++?