The code for a template function is generated when:
a. The function template declaration (prototype) appears in the C++ program.
b. The function template is encountered in the C++ program.
c. The function call is encountered in the C++ program
d. At runtime, when the function call is executed.
Part c)
Explanation: Code for template function is generated by the compiler when the call is encountered during the compiling of the C++ program.
Note to the Instructor: The answer to this question is very compiler dependent. It is based in part on the PITFALL: Compiler Complications in the text on page 659 . Use of this question requires investigation of problems with your compiler’s template facility.
You might also like to view...
Charts represent tables of data graphically
Indicate whether the statement is true or false
In order to use the stream manipulators, you must include the ______ library
a. manip b. iomanip c. cstdlib d. fstream