Computer Science - Object Oriented Programming Using C++ - Discussion

Discussion Forum : Object Oriented Programming Using C++ - Section 2 (Q.No. 6)
6.
The return type you code for all constructors is _____
void
the class type
the same type as the first data member defined in the class
no type
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
4 comments Page 1 of 1.

Sathya said:   1 decade ago
Because the constructor have same name as class.

Shivkumar napit said:   1 decade ago
Because constructor are only used to create memory of objects,When any object is called.

Shrikant said:   1 decade ago
Because constructors are only to allocate memory to the objects and initialize them. They do not return any value of reference to those objects.

Yousif said:   2 years ago
Please explain about the answer in detail.

Post your comments here:

Your comments will be displayed after verification.