C++ Programming - Constructors and Destructors - Discussion
Discussion Forum : Constructors and Destructors - General Questions (Q.No. 8)
8.
Which of the following statement is incorrect?
Discussion:
34 comments Page 4 of 4.
Radhika said:
1 decade ago
Constructor is a special member function of class. So ALL the statements are correct.
Amit Kumar Giri said:
1 decade ago
My dear friends. Option D is correct.
Compiler by default provide public constructor. Constructor can be private. To implement singleton class we have to make constructor private. It is one of the design pattern.
Compiler provides default constructor with argument. In case of copy constructor called, by default compiler provides the constructor with the argument type of that class.
Compiler by default provide public constructor. Constructor can be private. To implement singleton class we have to make constructor private. It is one of the design pattern.
Compiler provides default constructor with argument. In case of copy constructor called, by default compiler provides the constructor with the argument type of that class.
Manish said:
1 decade ago
Can we create static constructor?
Alex said:
1 decade ago
Have you heard of Singleton pattern? The constructor is private and the object is created via a static function.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers