Can we create instance for Abstract class?
Answer Posted / rupali
we cant make object of abstract class becoz, in the vtable the vtable entry for the abstract class functions will be NULL, which ever are defined as pure virtual functions...
even if there is a single pure virtual function in the class the class becomes as abstract class..
if there is a virtual function in your class the compiler automatically creates a table called virtual function table .. to store the virtual function addresses.... if the function is a pure virtual function the vtable entry for that function will be NULL.
even if there is a single NULL entry in the function table the compiler does not allow to create the object.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is serialization in c#?
What is the function of .IsDescendent()?
Can a private virtual method can be overridden?
If you define a user defined data type by using the class keyword, is it a value type or reference type?
Can we set image Source dynamically using C# in WPF application?
What is the difference between dll and lib?
In which order the constructor is called for an inherited class?
Int map to which .net types?
What is asynchronous one-way calls?
What is expression tree with example?
What is a generic class?
What happens during the process of boxing?
What is an int c#?
Are arrays value types or reference types?
What is xml comments in c#?