IGDTUW 2025 — Computer PYQ
IGDTUW | Computer | 2025Which of the following concepts means determining at runtime what method to invoke?
Choose the correct answer:
- A.
Data hiding
- B.
Dynamic Typing
- C.
Dynamic binding
(Correct Answer) - D.
Dynamic loading
Dynamic binding
Explanation
The correct answer is C: Dynamic binding.
Explanation
Dynamic binding (also known as late binding or runtime polymorphism) is a core concept in Object-Oriented Programming (OOP). It refers to the process where the code to be executed for a specific method call is not determined until the program is running.
In languages like Java or C++, when you have a reference variable of a base class pointing to an object of a derived class, the compiler cannot determine at compile time which version of an overridden method will be called. Instead, the runtime environment decides this based on the actual type of the object being referred to, not the type of the reference variable.
Explanation
The correct answer is C: Dynamic binding.
Explanation
Dynamic binding (also known as late binding or runtime polymorphism) is a core concept in Object-Oriented Programming (OOP). It refers to the process where the code to be executed for a specific method call is not determined until the program is running.
In languages like Java or C++, when you have a reference variable of a base class pointing to an object of a derived class, the compiler cannot determine at compile time which version of an overridden method will be called. Instead, the runtime environment decides this based on the actual type of the object being referred to, not the type of the reference variable.
