C++ Programming - OOPS Concepts - Discussion
Discussion Forum : 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.
Discussion:
20 comments Page 1 of 2.
Aditya Lath said:
7 years ago
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.
(3)
Kushal baldev said:
9 years ago
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.
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.
(2)
Sapana said:
6 years ago
I aggree with you @Kushal.
(1)
Mamta gehlot said:
8 years ago
Good explanation. Thanks to all.
(1)
Aradhye said:
1 month ago
- Runtime polymorphism allows a base class reference or pointer to refer to a derived class object.
- But compile-time polymorphism, the compiler only sees the reference type unless the function is marked virtual.
- But compile-time polymorphism, the compiler only sees the reference type unless the function is marked virtual.
Samson said:
1 decade ago
Polymorphism is a example of dynamic binding so type of reference is considered on runtime.
Avinash bacchewar said:
6 years ago
Agree @Aditya lath.
Nitin said:
8 years ago
Thank you all.
Mahesh said:
9 years ago
Good explanations. Thank you all.
Dipak Borkar said:
9 years ago
Good explanation, thank you all.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers