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 1 of 3.

Vikrant said:   1 decade ago
Constructor Special type of member function whose name same as class name constructor are automatically called when object is created and Enter in leave in scope.

Destructor are automatically called when object is Destroyed.

Sagar said:   2 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.

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

Shyam biradar said:   7 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.

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

Dhivya said:   8 years ago
I need clear answer with explanation.

Shital Jawale said:   9 years ago
When object is created the call goes automatically to the constructor.

Shital Jawale said:   9 years ago
When object is created the constructor will automatically called.

Kanha said:   10 years ago
Automatic object is local object of any function like "this".

Viknesh said:   10 years ago
An automatic object is not a dummy argument. An automatic object always has the controlled automatic storage class.


Post your comments here:

Your comments will be displayed after verification.