C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 2)
2.
Which of the following is not a type of constructor?
Copy constructor
Friend constructor
Default constructor
Parameterized constructor
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
68 comments Page 3 of 7.

Jitendra Kumar said:   10 years ago
C++ have only three type of constructor:

1. Copy constructor.

2. Default constructor.

3. Parameter constructor.

Faisal Baloch said:   7 years ago
Because Constructor has three types:

1. Default Constructor.
2. Parameterized Constructor.
3. Copy Constructor.

Ganesh Vahinde said:   1 decade ago
Friend is not a constructor it is the function, which allows to use the private data out side the class.

Pradeep said:   1 decade ago
Friend Keyword is used for class and Functions. Rest of the 3 options are available constructor in c++.

Sushil Sinha said:   1 decade ago
Friend is not a constructor. It is just a function. All options except friend are types of constructor.

Kushal said:   1 decade ago
because friend are not constructors they are just used to access private data members of the classes.

Swati said:   1 decade ago
Friend keyword is use to create a friend function or friend class, it is not a type of constructor.

Srikanth said:   1 decade ago
Constructor's cannot have type or qualifiers. Hence nothing can precede constructor including void.

Kajal kale said:   1 decade ago
Because friend function are used to the join to to the class. Hence it is not type of constructor.

Yogesh rajput said:   1 decade ago
Only three type of constructor are, friend is a special member function, so it is a right answer.


Post your comments here:

Your comments will be displayed after verification.