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
Can we define a class within the interface?
Why do we use class?
Why do we use polymorphism in oops?
What is the difference between static polymorphism and dynamic polymorphism?
What is abstraction with example?
What is the importance of oop?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
#include
What type of loop is a for loop?
What are the 3 principles of oop?
What does I oop mean?
What is encapsulation process?
What is object-oriented programming? Webopedia definition
Why is oop useful?
Write a program to reverse a string using recursive function?