C++ Programming - Constructors and Destructors - Discussion

Discussion Forum : Constructors and Destructors - General Questions (Q.No. 13)
13.
Which of the following gets called when an object goes out of scope?
constructor
destructor
main
virtual function
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
3 comments Page 1 of 1.

Lingeshwari said:   1 decade ago
Scope means the object created can be used by that class only. It cannot be used to access other class members.
(2)

Goral said:   1 decade ago
What is scope of object?

Vimal Gorvadia said:   1 decade ago
Destructor : "It is a special member function which runs automatically when the scope of object will over. ".
It's special because we don't need to call it but it will be called automatically when the scope of object will get over.
(1)

Post your comments here:

Your comments will be displayed after verification.