C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 17)
17.
Which of the following statement is correct?
A constructor is called at the time of declaration of an object.
A constructor is called at the time of use of an object.
A constructor is called at the time of declaration of a class.
A constructor is called at the time of use of a class.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
26 comments Page 2 of 3.

Suvi said:   1 decade ago
I think there one is the correct answer because in C++ declaring a object means its creation. :).

Biraj said:   1 decade ago
Option A and D are same and both are wrong.
Constructor is called at time of object creation :-)

Priyanka p said:   1 decade ago
According to me, constructor is a special function which can be invoke when object is created.

Shadab said:   1 decade ago
According to me, When we are create a object then automatically create default Constructor.

Bala Manikandan said:   1 decade ago
A constructor is called at the time of initialization of an object and not at declaration.

Sri said:   1 decade ago
When we are declare or creating the objects then the constructor is automatically invoked.

Naveen singh said:   1 decade ago
If constructor is not define in class, then it will be provided by JVM automatically.
(1)

YUKTHI said:   10 years ago
By default a constructor is immediately called as soon as an object is created.
(2)

Shrikant said:   1 decade ago
Because object needs to construct class elements and create real world object.

Pradeep said:   1 decade ago
Because an constructor is called right when the object is created for a class.


Post your comments here:

Your comments will be displayed after verification.