Take FREE!! Online Cocubes Mock Test to Crack various Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
Take 30+ FREE!! Online Arithmetic Aptitude Mock test to crack any Exams.
Technical Discussion :: C++

76 / 184

What is overloading constructor?
Or
What is multiple constructor?

Answer:

The sharing the same name by two or more functions is referred to as function overloading. Similarly when more than one constructor function is defined in a class. We say that the constructor is overloaded. It is also called multiple constructors.

Example :
Complex() { } //constructor with no arg.
Complex (float a) { x=y=a;} //constructor with one arg.
Complex (float real, float imag) //constructor with two arg.

Asked In :: TCS

Post Your Answer Here:


Rate This: +0 -0     
Report    

Post Your Reply Here:

Alert me
q4i-reply-your-answer

Report Error

Please Login First Click Here

Most Popular Qs.