C++ Programming - Constructors and Destructors - Discussion

Discussion Forum : Constructors and Destructors - General Questions (Q.No. 1)
1.
A constructor that accepts __________ parameters is called the default constructor.
one
two
no
three
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
22 comments Page 1 of 3.

Shree said:   5 years ago
Thanks for the explanation. It is very useful.

Vinaya said:   5 years ago
What is constructor?

Hariharan R said:   5 years ago
Whether parameters and arguments are different in meaning?

Shwetha said:   5 years ago
Here, we cannot passing any parameters into constructor.

Venkataramana said:   6 years ago
The default constructor doesn't have any parameters because that is default created by the compiler at compile time. We no need to write a default constructor.

Tahseen ahmed said:   7 years ago
The correct answer is NO.

Because the default constructor is the constructor which is fired by the compiler when we declared the object in the main program and it allocates the memory to the object but does not give any value to it.

Chandani said:   7 years ago
The default constructor does not accept parameter because it is the default that does not accept a parameter.

Shivam said:   7 years ago
In that case if we pass any parameter in the default constructor that can not be acceptable in the constructor.

Rohit Patil said:   7 years ago
But parameter constructor takes an argument.

Alok raj said:   9 years ago
Default constructor uses default values if it is required. The sense of "if it is required" is in this sense guys if less argument is given then required then only it is used.

So if no argument is given that it will use default values. Thus default constructor.


Post your comments here:

Your comments will be displayed after verification.