Question: 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

#include <iostream>
using namespace std;
class Room
{
private:
int width;
public:
Room(): width(0) { }
friend int printWidth(Room); //friend function
};
int printWidth(Room b)
{
b.width += 10;
return b.width;
}
int main()
{
Room b;
cout<<"Width of Room: "<< printWidth(b)<<endl;
return 0;
}
Types of constructors in C++
C++ has 3 types of constructors;
- Copy constructor
- Default constructor
- Default constructor

C++ Program of Copy constructor & parameterized constructor
#include <iostream>
using namespace std;
class t4tutorials
{
public:
int num;
t4tutorials (int a) // parameterized constructor.
{
num =a;
}
t4tutorials (t4tutorials &i) // copy constructor
{
num = i. num;
}
};
int main()
{
t4tutorials abc(44); // Calling the parameterized constructor.
t4tutorials xyz(abc); // Calling the copy constructor.
cout<<xyz. num;
return 0;
}
C++ Program of Copy constructor & parameterized constructor
// Cpp program to show Default Constructor
#include <iostream>
using namespace std;
class BSCS {
public:
int x, y;
// Default Constructor
BSCS()
{
x = 44;
y = 55;
}
};
int main()
{
// Default constructor called automatically
// when the object is created
BSCS t4tutorials;
cout << "x: " << t4tutorials.x << endl
<< "y: " << t4tutorials.y;
return 1;
}
1000+ Programming C Plus Plus MCQs
Highly Recommended C++ Important MCQs with Explanation
- Which symbol is used to create multiple inheritances?
- If a derived class object is created, which constructor is called first?
- Which of the following is not a type of constructor?
- a ____ is a member function that is automatically called when a class object is __.
- What is the output of the following code in C++?
- How many times will the following code print?
- Which of the following is a procedural language?
- Which of the following is not a programming language?
- Which of the following is not an example of high-level language?
- While declaring pointer variables which operator do we use?
- To which does the function pointer point to?
- Which of these best describes an array?
- Which of the following is a Python Tuple?
Other important MCQs
Data Structure
Which of the following is not the type of queue?
Database
If one attribute is a determinant of the second, which in turn is a determinant of the third, then the relation cannot be
Python
Which of the following is a Python Tuple?