adplus-dvertising
CPP MCQ
What is the lifetime of the element in container?
A)
Outside the block
B)
Whole program
C)
Everywhere
D)
Only on that container

Correct Answer : Option (D) :   Only on that container

Explanation : A Container “owns” its elements: the lifetime of an element stored in a container cannot exceed that of the Container itself.