Which of the following is not a type of constructor?
2022
Which of the following is not a type of constructor?
- A.
Copy constructor
- B.
Friend constructor
- C.
Default constructor
- D.
Parameterized constructor
Attempted by 165 students.
Show answer & explanation
Correct answer: B
Constructors are special member functions that are invoked automatically when an object of a class is created. They have the same name as the class and do not have a return type. A Friend Function is a function that is not a member of a class but has permission to access its private and protected members. Because a constructor must be a member of the class it belongs to, a "Friend Constructor" is a logical contradiction in C++ syntax.