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 toint32 c#?
What does exclamation mark mean in access query?
What are properties in C#?
What are the methods in c#?
What is the difference between internal and private in c#?
What is the use of constructor in c# with example?
Is it possible to inherit multiple interfaces?
How can you prevent escaping on backslashes in C# with string definitions?
To create a localized application which namespaces are necessary?
Can datetime be null c#?
Define Final Class in C#
Which is better interface or abstract class in c#?
What can we do to handle multiple exceptions?
What is executenonquery c#?
What is variable and its classification?