C++ Programming - Constructors and Destructors - Discussion

Discussion Forum : Constructors and Destructors - General Questions (Q.No. 5)
5.
For automatic objects, constructors and destructors are called each time the objects
enter and leave scope
inherit parent class
are constructed
are destroyed
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
24 comments Page 3 of 3.

Prabhas sagar said:   10 years ago
What are automatic objects please explain in detailed?

Shyam biradar said:   8 years ago
Automatic objects means local variables which are created in stackframe.

So now, you visualize what happens to local variables when a stack frame is created and when its destroyed.

Shree said:   7 years ago
Thanks for the explanation. It is very useful to understand the concept.

Sagar said:   3 years ago
When object is created the constructor is called automatically, and when we deal with the local variables they are created in the stack.


Post your comments here:

Your comments will be displayed after verification.