Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(For those who already know C or C++) What is the binding time for each of the f

ID: 3651487 • Letter: #

Question

(For those who already know C or C++) What is the binding time for each of the following in a C or C++ program? State the binding time as precisely as possible (language-definition time, language-implementation time, compile time, link time, load time, or runtime). Explain how each of the following is bound and why it is bound when it is.

a. The location in memory of a local variable in a function.
b. The meaning of the keyword while.
c. The size in memory of a variable of type int.
d. The location in memory of a global static variable.
e. The code for the printf function.
f. The type of a local variable in a function.
g. The value(s) assigned to a variable.
h. The size in memory of a pointer.

Explanation / Answer

Binding is the association of an object to its attributes, operations, or name there are many different types of bindings and bindings can occur at different times for example: 1)language definition time binding: for example--->binding * to multiplication 2)language implementation time binding: int size and operations 3)compile time binding: binding type to a variable for instance in int x; x will be treated as an int from here forward 4)link time binding: binding function name to a specific function definition 5)load time binding: binding variable to memory location 6)run time binding: binding variable to memory location or bind a polymorphic variable to specific class type a)6 b)1 c)2 d)5 e)4 f)3 g)3 h)6