[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.
Technical Discussion :: C++

76 / 187

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.