Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are methods in C#?

955


Why do we need constructor in c#?

925


What is the default modifier for class in c#?

958


What are predicates in c#?

932


How string definitions will prevent escaping on backslashes in C#?

988


Can we overload indexer in c#?

877


What are the ways in which client can create object on server in cao model?

965


Is class reference type c#?

916


What can be done with c#?

821


Why do we use static methods in c#?

1004


Are c# generics the same as c++ templates?

924


How do you read an Excel sheet in C#?

983


What is the c# equivalent of c++ catch (...), Which was a catch-all statement for any possible exception?

994


What does dbml mean?

866


explain the three services model commonly know as a three-tier application.

982