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 _____
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:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers