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 array and types of array in c#?
What is private and shared assembly?
I have 3 overloaded constructors in my class. In order to avoid making instance of the class do I need to make all constructors to private?
Define c# i/o classes?
Explain how can you clean up objects holding resources from within the code?
How many types of constructors are there?
What is the difference between abstract class and interface in c#?
How C# 4.0 supports dynamic programming language?
What are strongly typed objects?
What is verbatim string literal in c#?
What is the components of window?
What is stringwriter c#?
What are the types of comments in c#?
What is dictionary class in c#?
How many types of delegates are there in c#?