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...

What is object slicing and how can we prevent it?

Answer Posted / prits

When an instance of derived class is assigned to base class
instance object slicing takes place.ie in this case the
derived portion gets truncated and only the base portion
remains.

The problem of object slicing can be prevented by the use
of pure virtual functions.

Is This Answer Correct ?    38 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why c++ is better than c language?

955


What is a pointer with example?

1152


Explain selection sorting. Also write an example.

983


What is c++ virtual inheritance?

1073


Is it possible to write a c++ template to check for a function's existence?

955


What are c++ manipulators?

1004


What's the hardest coding language?

946


What does namespace mean in c++?

1035


What are the 4 types of library?

1114


Why do we use setw in c++?

1055


How do you sort a sort function in c++ to sort in descending order?

940


How do you declare a set in c++?

911


How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?

3593


What is & in c++ function?

1007


Can we overload operator in c++?

980