answersLogoWhite

0


Best Answer

There is no preference as such. The type of binding you use is more dependant upon the design and circumstance rather than any preference you may have. Static binding is certainly more predictable and therefore easier to program, but dynamic binding offers much greater flexibility.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Which binding in C plus plus is preferred and why?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Static vs dynamic binding in c plus plus?

Static binding occurs at compile time. Dynamic binding occurs at runtime.


How ploymorphism and inheritance is different from that in Java and c plus plus?

C++ allows multiple inheritance while Java does not. In my opinion, multiple inheritance is not useful because it can get very confusing very quick. For polymorphism, C++ does early binding by default, while Java does late binding by default. Late binding is more useful than early binding.


Does c and c plus plus support static or dynamic binding?

Yes and no. Static vs dynamic binding is not a C or C++ language issue; it is a linker issue. If you link with a .lib file that contains stubs for run-time loading, then the called routine will not be loaded until it is invoked, and it will not be made a part of the load module.


What are the various concepts of c plus plus?

1.Classes and Objects 2.Constructors and Destructors 3.Inheritance 4.Polymorphism 5.Dynamic Binding


Why dynamic binding is not possible for normal C functions?

Dynamic binding is certainly possible for normal C functions. Binding is a function of the binder (linker) and has nothing to do with the language itself.


Why does C plus plus allows static binding and not dynamic binding?

Dynamic binding, or late binding, is when the object code for the class does not get loaded into memory until it is needed. This saves time at module load time, at the cost of delayed execution for the first invocation.


What is b plus b plus b plus c plus c plus c plus c?

b+b+b+c+c+c+c =3b+4c


What is c plus c plus 2c plus c plus c equal?

c + c + 2c + c + c = 6c


B plus b plus b plus c plus c plus c plus c equals?

b + b + b + c + c + c + c = 3b + 4c


Why c plus plus is not complete object oriented language?

because c++ supports all the basic concepts of oop :1.objects,2.classes,3.data abstraction and encapsulation,4.inheritance,5.polymorphism,6.dynamic binding,5.message passing.


What is the difference between dynamic loading and late binding in C plus plus?

Late binding occurs when the compiler does not have enough information to verify a method exists for a given function signature and therefore cannot bind that method to its allotted slot in the v-table. The method must instead be located by its name at runtime, which will incur a performance penalty every time that method is called. Early binding is more efficient and is therefore the preferred method of binding virtual methods, but late binding exists to cater for those cases where early binding is simply not an option. Dynamic loading occurs when a library may or may not be available at compile time and must be loaded at runtime. All symbols exposed by the library must therefore be resolved at loadtime. If the library is not available at loadtime the program should be engineered to provide a graceful fallback. Dynamically loading libraries that also rely on late binding should be avoided wherever possible, but it may be the only solution available in some cases.


Symplify c plus c plus c plus c?

4c