C++ Programming - OOPS Concepts - Discussion

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

5. 

Which of the following concepts means determining at runtime what method to invoke?

[A]. Data hiding
[B]. Dynamic Typing
[C]. Dynamic binding
[D]. Dynamic loading

Answer: Option C

Explanation:

No answer description available for this question.

Dipanjan Saha said: (May 7, 2012)  
Please can you tell what's the difference between Dynamic binding and dynamic loading?

Vairakkani said: (May 16, 2012)  
Dynamic loading means compile time. But dynamic binding means runtime that's why dynamic binding is correct.

Srikanth said: (May 23, 2012)  
I don't agree with Vairakkani.

Dynamic means Runtime. Whereas static means Compile time.

Binding can be defined as the association between (link) function call to a function definition.

Dynamic binding means. The association (link) of function call to a function definition during runtime.

Utsav Bhatnagar said: (May 24, 2012)  
Can you please explain in more detail about dynamic binding, dynamic loading.

Prashant said: (Jun 15, 2012)  
Dynamic loading is a mechanism by which a computer program can, at run time, load a library (or other binary) into memory, retrieve the addresses of functions and variables contained in the library, execute those functions or access those variables, and unload the library from memory.

Nikita Choudhary said: (Jul 1, 2012)  
Dynamic binding binds the data at the run time. Whereas static is at the time of compiling.

Karthi said: (Jul 4, 2012)  
Can you please explain data hiding, dynamic binding with examples ?

Kavita Bangar said: (Jul 12, 2012)  
Prashant is correct!

In C++ you can have an array of base classes but you can call different functions of the derived class by assigning the derived class objects addresses by using virtual functions-this is dynamic binding. If the methods are virtual then this is dynamic binding.

Rupali said: (Jul 26, 2012)  
What is mean by dynamic loading, binding and linking ?

Rohit said: (Aug 4, 2012)  
Why not the dynamic typing is correct ? If we see the example of function overloading then ther is dynamic linking on the basis of data types ? So dynamic lynking may be correct. Please answer.

Susi said: (Aug 9, 2012)  
Can I know the example for dynamic binding and dynamic loading ?

Dipali Chaudhari said: (Sep 20, 2012)  
Dynamic binding means Check at runtime.

Ankita said: (Sep 26, 2012)  
Hey whats dynamic typing ?

Vivek Kumar said: (Feb 7, 2013)  
In C++ you can have an array of base classes but you can call different functions of the derived class by assigning the derived class objects addresses by using virtual functions-this is dynamic binding. If the methods are virtual then this is dynamic binding.

Bawa said: (Mar 18, 2013)  
What is data hiding?

Dureadan said: (Apr 9, 2013)  
Data hiding mean the data of 1 function is hidden from other function present in same class. Also known as encapsulation.

Gurpreet said: (May 6, 2013)  
Data hiding specifically means hiding the contents of 1 function from another being described in a program. It is implemented via using access specifiers namely protected and private.

Yashwanth said: (Aug 11, 2013)  
What's the difference between data hiding and data binding?

Anita said: (Sep 19, 2013)  
Dynamic binding is correct answer because in run time only we are binding the objects to call member functions from the class for invoking the functions from class this mechanism is used.

Alok Singh Chauhan said: (Oct 2, 2013)  
Well if we talk about run time(dynamic) binding and static binding. Then,

Run time binding is one where function is select at running the program.
Eg - virtual functions.

Static binding is one where the object is bound to function call.
Eg - function overloading and operator overloading.

Asha said: (Oct 3, 2013)  
What is dynamic typing?

Revathi said: (Oct 9, 2013)  
Discuss about dynamic typing and dynamic loading?

Lillfrancis said: (Mar 11, 2014)  
Can you explain the concept of difference in dataloading & databinding.

Shaikh Moin Rukmoddin said: (Apr 8, 2014)  
In C++ you can have an array of base classes but you can call different functions of the derived class by assigning the derived class objects addresses by using virtual functions - this is dynamic binding. If the methods are virtual then this is dynamic binding.

Bhavik said: (Apr 29, 2014)  
Can you please tell me late binding and early binding?

Kannan said: (May 14, 2014)  
Late binding is Run Time Binding or Dynamic Binding.

Early binding is Compile Time Binding or Static Binding.

These are different terms meaning same thing.

Aayushi said: (Jul 3, 2014)  
What is dynamic binding and dynamic loading?

Neha said: (Jul 3, 2014)  
What is dynamic typing?

Gagan said: (Jul 8, 2014)  
Static Typing:

Static typed programming languages are those in which variables need not be defined before they're used. This implies that static typing has to do with the explicit declaration (or initialization) of variables before they're employed. Java is an example of a static typed language; C and C++ are also static typed languages. Note that in C (and C++ also), variables can be cast into other types, but they don't get converted; you just read them assuming they are another type.

Static typing does not imply that you have to declare all the variables first, before you use them; variables maybe be initialized anywhere, but developers have to do so before they use those variables anywhere. Consider the following example:

/* C code */
static int num, sum; // explicit declaration
num = 5; // now use the variables
sum = 10;
sum = sum + num;
The above code fragment is an example of how variable declaration in static typed languages generally appears. Note that in the above code, static has nothing to do with static typing; it has been used along with int only to initialize num and sum to zero.

Dynamic Typing:

Dynamic typed programming languages are those languages in which variables must necessarily be defined before they are used. This implies that dynamic typed languages do not require the explicit declaration of the variables before they're used. Python is an example of a dynamic typed programming language, and so is PHP. Consider the following example:

/* Python code */
num = 10 // directly using the variable
In the above code fragment, we have directly assigned the variable num the value 10 before initializing it. This is characteristic to dynamic typed programming languages.

Guru said: (Apr 8, 2015)  
What is difference between dynamic binding and dynamic loading? Can you explain me easily or any real time example?

Priti Rathi said: (Aug 10, 2015)  
Dynamic binding is also called as a "Run time binding". It binds the function call to its body at a run time so we can say that, dynamic binding invokes the function call at run time.

Madhu said: (Oct 28, 2015)  
@Guru,

Dynamic binding is a technique where function call could be linked to its code at run time. We can see it in inheritance, etc.

But dynamic loading is a mechanism undergone by the system where loading of libraries, functions and their data takes place.

Kandrasai said: (Dec 9, 2015)  
Binding means, linking of a procedural code to its functional call. During inheritance, when we are having the base and derived classes with same function name, at that time it may lead to the confusion of the compiler to link its exact procedural code. So we use the key word "virtual" to base class function.

So the compiler postpones the linking of procedural code for that one during the compile time. And binds its procedural code lately, which is called as "late or dynamic or run time binding".

Myths said: (Jan 23, 2016)  
Can you say real time example for data hiding/encapsulation?

Teju said: (Jul 25, 2016)  
Can anyone explain the difference between the data loading and data binding?

Mohaaa said: (May 28, 2018)  
Dynamic typing concepts mean determining at runtime what method to invoke. Right?

Gunjan said: (Jul 5, 2019)  
Binding refers to linking of processor call to the code to be executed in response to the call.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.