Advertisements
Advertisements
Question
Differentiate between static binding and dynamic binding.
Distinguish Between
Advertisements
Solution
| Basis of Difference | Static Binding | Dynamic Binding |
|---|---|---|
| Meaning | The function call is linked to its definition before execution. | The function call is linked to its definition during execution. |
| Time of binding | It occurs at compilation time. | It occurs at run time. |
| Function to execute | It is known in advance. | It may not be known until the program runs. |
| Flexibility | It is less flexible. | It is more flexible. |
| Common association | It is generally associated with early binding. | It is generally associated with run-time polymorphism. |
shaalaa.com
Is there an error in this question or solution?
