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

Kapil jat said:   1 decade ago
Friend is only function not a create constructor.

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

Sahithi said:   1 decade ago
Friend is a function but it is not a constructor.

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

Manu said:   1 decade ago
Because friend function is used not constructor.

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.

Pooja Naokar said:   1 decade ago
There are 3 types of constructors

1. Default constructor with no parameters.
2. Parameterized constructor as its name implies with
one or more parameters.
3. Copy constructor which takes reference of object as
parameter.

And Friend is a funcion to access private members of 2 different classes to which it has been declaredas friend.

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

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.


Post your comments here:

Your comments will be displayed after verification.