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 2 of 3.
Yog patil said:
1 decade ago
Default constructor does not take any argument. its syntax is given as:
sample( )
{
x=0;
y=0;
}
sample( )
{
x=0;
y=0;
}
Premchandar777 said:
1 decade ago
The term default in the sense, it takes common value (default) when its not assigned.
Animesh said:
1 decade ago
If you supply a constructor with parameters then a default will not be created.
Charuka said:
2 years ago
Constructors with zero parameters are called as default constructors.
(1)
Priyanka said:
1 decade ago
Constructor does not contain any argument called default constructor.
Hariharan R said:
8 years ago
Whether parameters and arguments are different in meaning?
Shwetha said:
8 years ago
Here, we cannot passing any parameters into constructor.
Vijayakumar said:
1 decade ago
If it takes parameter it is not default constructor.
Shree said:
7 years ago
Thanks for the explanation. It is very useful.
Rohit Patil said:
10 years ago
But parameter constructor takes an argument.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers