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.
Discussion:
23 comments Page 1 of 3.
Charuka said:
1 year ago
Constructors with zero parameters are called as default constructors.
(1)
Shree said:
7 years ago
Thanks for the explanation. It is very useful.
Vinaya said:
7 years ago
What is constructor?
(1)
Hariharan R said:
7 years ago
Whether parameters and arguments are different in meaning?
Shwetha said:
7 years ago
Here, we cannot passing any parameters into constructor.
Venkataramana said:
8 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:
8 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.
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:
8 years ago
The default constructor does not accept parameter because it is the default that does not accept a parameter.
Shivam said:
9 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:
9 years ago
But parameter constructor takes an argument.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers