Can we have a private virtual method ?
Answer Posted / nk
We can have virtual functions as long as we dont call the
function from a base pointer pointing to the base
class/derived class.
If we call then gives error.
The same error can be tested by compiling and running above
example.
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
write knight tour problem which is present in datastructure
What are the 4 pillars of oop?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
What is oops in programming?
What is advantage of inheritance?
Why is encapsulation used?
to find out the minimum of two integer number of two different classes using friend function
What is the difference between inheritance and polymorphism?
What is abstraction and encapsulation?
What are objects in oop?
Why is destructor used?
write a program to find 2 power of a 5digit number with out using big int and exponent ?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
can inline function declare in private part of class?