C++ Programming - OOPS Concepts - Discussion

Discussion :: OOPS Concepts - General Questions (Q.No.30)

30. 

Which one of the following options is correct about the statement given below? The compiler checks the type of reference in the object and not the type of object.

[A]. Inheritance
[B]. Polymorphism
[C]. Abstraction
[D]. Encapsulation

Answer: Option B

Explanation:

No answer description available for this question.

Samson said: (Jul 21, 2012)  
Polymorphism is a example of dynamic binding so type of reference is considered on runtime.

Christian said: (Apr 9, 2013)  
Is this because the object formed by polymorphism can take many forms?

Shashikant said: (Aug 5, 2013)  
i think is becoz runtime polymorphism if we not mention the virtual keyword in base class then type is checked and function in the base class gets called...

Sadique Rahman said: (Jan 23, 2014)  
Object in polymorphism exist in many forms so it doesn't check the type of object while it will definitely check the type of reference in the object.

Roshu said: (Oct 27, 2014)  
Why polymorphism?

Abhilasha said: (Oct 30, 2014)  
If object is created run time by using base class pointer (allow to store address of any derived class)/reference and base class functions are virtual and overridden in derived class then base class pointer calls the function of derived class.

Karan Khan said: (Jan 22, 2015)  
What is wrapping?

Keshav Miglani said: (Sep 25, 2015)  
Wrapping means hiding and this concept used in encapsulation and abstraction but mostly this wrapping word used for encapsulation.

Vasanta said: (Jan 30, 2016)  
What is polymorphism?

Riyaz said: (May 25, 2016)  
What is mean by many forms?

Kushal Baldev said: (Jul 2, 2016)  
Polymorphism means one name and multiple implementations.

We have two types of polymorphism early binding and late binding in early binding we are able to know at compile time but in late binding we will know at run time what actually the function will be called.

Prakash Pathiyam said: (Aug 6, 2016)  
Helpful explanations, Thanks.

Dipak Borkar said: (Sep 7, 2016)  
Good explanation, thank you all.

Mahesh said: (Sep 14, 2016)  
Good explanations. Thank you all.

Mamta Gehlot said: (Oct 9, 2017)  
Good explanation. Thanks to all.

Nitin said: (Dec 11, 2017)  
Thank you all.

Aditya Lath said: (Apr 28, 2018)  
In compile Time polymorphism (i.e overloading) compiler doesn't need to check reference of an object/reference variable but in case of run-time polymorphism, it is required to check reference of Object.

Sapana said: (Jun 9, 2019)  
I aggree with you @Kushal.

Avinash Bacchewar said: (Feb 2, 2020)  
Agree @Aditya lath.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.