C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 5)
5.
Which of the following concepts means determining at runtime what method to invoke?
Data hiding
Dynamic Typing
Dynamic binding
Dynamic loading
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
37 comments Page 3 of 4.

Asha said:   1 decade ago
What is dynamic typing?

Revathi said:   1 decade ago
Discuss about dynamic typing and dynamic loading?

Lillfrancis said:   1 decade ago
Can you explain the concept of difference in dataloading & databinding.

Shaikh Moin Rukmoddin said:   1 decade ago
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:   1 decade ago
Can you please tell me late binding and early binding?

Kannan said:   1 decade ago
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:   1 decade ago
What is dynamic binding and dynamic loading?

Neha said:   1 decade ago
What is dynamic typing?
(1)

Gagan said:   1 decade ago
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.
(2)

Guru said:   1 decade ago
What is difference between dynamic binding and dynamic loading? Can you explain me easily or any real time example?


Post your comments here:

Your comments will be displayed after verification.