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

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.

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

Guru said:   1 decade ago
What's the work of Parameterized constructor ?

Ajitha said:   1 decade ago
Because friend function is named as private in access the data in defined class.

Suresh said:   1 decade ago
Constructor are used to initialize the object. The Friend constructor is not available as a constructor. Friend is function. which use to access the data and methods of the defined class.

Sudhir kumar kushwaha said:   1 decade ago
Only three type of constructor.
Copy constructor
Default constructor
Parameterized constructor

Sanjaya said:   1 decade ago
We have friend class and function, not any constructor.

Srikanth said:   1 decade ago
Constructor's cannot have type or qualifiers. Hence nothing can precede constructor including void.


Post your comments here:

Your comments will be displayed after verification.