what is object slicing?

Answer Posted / bibek

object slicing is the technique where we when we assign the
value of derived class to the base class,only the base class
content is sliced not the derived class own datamember.

Is This Answer Correct ?    10 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use oops?

750


What is data binding in oops?

821


What is multilevel inheritance?

939


What does and I oop and sksksk mean?

861


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6701


What are the benefits of polymorphism?

855


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?

3103


What is the difference between a constructor and a destructor?

840


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1965


What is class in oop with example?

825


Which method cannot be overridden?

758


How do you answer polymorphism?

793


Why it is called runtime polymorphism?

780


Why is oop better than procedural?

804


What are the 5 oop principles?

831