QUESTION 24 The code for a template function is generated when: a)At runtime, wh
ID: 3715416 • Letter: Q
Question
QUESTION 24
The code for a template function is generated when:
a)At runtime, when the function call is executed.
b)The function template declaration (prototype) appears in the C++ program.
c)The function template is encountered in the C++ program.
d)The function call is encountered in the C++ program.
QUESTION 25
If heap memory has been dynamically allocated, but nothing contains the address of the dynamically allocated portion, then we have:
a)memory leak
b)never used the new operator
c)a desirable situation
d)a condition known as unaddressed heap memory
QUESTION 26
Which of the following is correct syntax to declare C++ class B to be a public base class for derived class D
a)public base class B: class D {/*…*/};
b)class D : public class B {/* … */};
c)class D : public B {/* … */};
d)class B: public D {/* ... */};
e)None of the above
Explanation / Answer
If heap memory has been dynamically allocated, but nothing contains the address of the dynamically allocated portion, then we have:
Answer:
a)memory leak
Which of the following is correct syntax to declare C++ class B to be a public base class for derived class D
Answer:
c)class D : public B {/* … */};
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.