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

Using the C++ programming language, indicate the binding time (language design,

ID: 3585332 • Letter: U

Question

Using the C++ programming language, indicate the binding time (language design, language implementation, compilation, link, run, etc.) for each of the following attributes.Justify your answer.

(a)The variable declaration that corresponds to a certain variable reference (use)

(b)The range of possible values for integer numbers

(c)The meaning of char

(d)The address of a local variable

(e)The address of a library function

(f)The referencing environment of a function passed as a parameter

(g)The total amount of memory needed by the data in a program

Explanation / Answer

a) The variable declaration corresponding to a particular variable reference has the binding time at compile time of the C++ code , The compile time in C++ uses the static scope .

b) The size of the integers in C++ is determined at the language implementation time and the range of possible values for integer numbers is chosen by the compiler at the compile time .

c) The meaning of the char has the maximum length allowed for a constant character string having a limit has the binding time at the language implementation time .

d) The address of the local variable which is non static has the binding time during the run time of the C++ program .

e) The address of the library function in C++ has the binding time at the linker or at the link time in many of the systems , and the address here corresponds to the virtual address , the absolute address will only be known at the loading time of program.

f) In c++ when the subroutine was declared the referencing environment for a subroutine that is passed as parameter is called as deep binding , this represents an early binding of the referencing environment .

g) The total memory needed by the data in a C++ program is determined at the run time of the program because the space required by the heaps or stacks will be known only after the input by user.