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 2 of 7.

Shashank said:   5 years ago
We have a friend class and function, not any constructor.

Constructors are of three types:
* Default Constructor.
* Parametrized Constructor.
* Copy Constructor.
(7)

Maddirala said:   1 decade ago
Friend constructors are not possible because this is the function not a class which is used for accessing private data and member variables outside class.

Vigneshwar said:   1 decade ago
Friend is not a constructor its a function...
Remaining all option to be under the constructor type...
Constructor is used to invoke the object..

Sujit kumar said:   1 decade ago
Friend is not a constructor its a function.

Remaining all option to be under the constructor type.

Constructor is used to invoke the object.

Amarnath Rokade said:   6 years ago
Note: There are main 3 types only.

1. Default.
2. Parameterless.
3. Parameterized.

Copy constructor is under Parameterized constructor.
(2)

Thazaar said:   10 years ago
Constructors are used to initialize the object whereas friend function is used to access the private data member of the classes.

Ravinder gurjar said:   1 decade ago
Only for three type constructor in j2se.

Defoult, parameterized, copy constructor.

Frinds connstructor is not constructor.

Nagesh said:   1 decade ago
Parameterized constructor is just like default constructor but allows the parameters just like functions with parameters.

Lalit said:   1 decade ago
Friend is a function, not a class & constructor is used with class, constructor is a function that create a object.

Priyanka patra said:   1 decade ago
Friend is not a constructor. It's a type of function which allow to access private data member variable of a class.


Post your comments here:

Your comments will be displayed after verification.