C++
Programming and Technical
Logical Reasoning
Coding Decoding
What do you mean by binding? Static vs. dynamic binding
Read Solution (Total 1)
-
- Static binding is the conversion of symbolic addresses in the program to storage-related addresses and occurs during compilation. Static binding occurs at compile time when a function and its definition, commonly called the code body of a function, are tied together.
Static binding is slightly more efficient than dynamic binding as it removes a layer of indirection to an object’s function pointer during program execution.
Statically bound functions may be in-lined. Dynamically bound functions are not usually in-lined; there are many rules and limitations to inline a dynamically bound function.
Dynamic binding is the selection of the correct function for a given member method of a class. The correct function is determined by searching through the virtual method table. The virtual method table is also known as the v-table. Dynamic binding only occurs at run-time and it is also known as runtime binding.
Dynamic binding occurs when the actual function to be used during program execution is determined and selected during program execution. In C++, dynamic binding is accomplished using virtual methods, pointers or references to objects. - 6 years agoHelpfull: Yes(0) No(0)
C++ Other Question