what is a virtual class?
Answer Posted / ramakrishna
It is used to avoid the ambiguity problem in c++ (multiple
inheritance).
when sub class inherits same members from 2 base classes.
compiler dont know which variable has assigned the value.
If u declare the class as virtual only one time is
inherited in its derived class.A copy will never get
inherited.
concept of virtual methods is different purpose.
like how we have abstract key word in java,we can acheive
method abstraction using virtual keyword before a method.
please select no if u really know this answer is wrong.
people with out having knowlede saying simple know hurts
the technical world.
Regards,
Ramakrishna Yechuri
sr corporate Trainer
yrk_in@yahoo.com
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
write a programe to calculate the simple intrest and compund intrest using by function overlading
What is property in oops?
What is byval and byref? What are differences between them?
How is class defined?
Is this job good for future? can do this job post grduate student?
What is overriding vs overloading?
What is class in oop with example?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
What is polymorphism used for?
What is a class in oop?
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?
What is encapsulation in simple terms?
What makes a language oop?
What are the benefits of interface?
What is the difference between static polymorphism and dynamic polymorphism?