Which of the following is not a type of constructor?

Which of the following is not a type of constructor?
a. Friend constructor
b. Copy constructor
c. Default constructor
d. Parameterized constructor
Answer:
Friend constructor


Friend constructor is not a constructor but the Friend function exists in C++.

C++ Program of Friend function

Friend Class in CPP

 

Types of constructors in C++

C++ has 3 types of constructors;

  1. Copy constructor
  2. Default constructor
  3. Default constructorTypes of constructors

C++ Program of Copy constructor & parameterized constructor

C++ Program of Copy constructor & parameterized constructor

1000+ Programming C Plus Plus MCQs

Add a Comment