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 a thread? What is multithreading?
What is difference between c sharp and c#?
What do u mean by delegation of authority?
write a program to find the biggest palindrome in the given string
What does return do in unity?
What is system console writeline in c#?
What is the difference between parse and tryparse in c#?
Why do I get a security exception when I try to run my c# app?
Why singleton is sealed?
Is php easier than c#?
What do you mean by synchronous and asynchronous operations?
What are immutable types in c#?
What are concrete classes?
Explain data types in c#?
Describe the types of comments in c#?