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?

Answers were Sorted based on User's Feedback



What is object slicing and how can we prevent it?..

Answer / 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

What is object slicing and how can we prevent it?..

Answer / vikas

Object slicing occurs when we assign an instance of the
subclass to a variable of type base class.

http://www.cppquestions.com/viewtopic.php?f=17&t=49

Is This Answer Correct ?    12 Yes 9 No

Post New Answer

More C++ General Interview Questions

Difference between shift left and shift right?

1 Answers   Symphony,


Define inline function

1 Answers  


What is lambda in c++?

0 Answers  


Why c++ is so important?

0 Answers  


Tell me an example where stacks are useful?

0 Answers  


Is python written in c or c++?

0 Answers  


Define pre-condition and post-condition to a member function in c++?

0 Answers  


What is the use of structure in c++?

0 Answers  


What is a terminating character in c++?

0 Answers  


How do you test your code?

4 Answers   Microsoft,


which is best institue to learn C/C++ IN AMEERPET OR MAITHRIVANAM OR SR NAGAR, PLEASE HELP. THANKS IN ADVANCE

5 Answers  


What does ios :: app do in c++?

0 Answers  


Categories