Which among the following best describes constructor overloading?

Danh Trịnh

New member
Which among the following best describes constructor overloading?
A. Defining one constructor in each class of a program
B. Defining more than one constructor in single class
C. Defining more than one constructor in single class with different signature
D. Defining destructor with each constructor
 
Answer: c
Explanation: If more than one constructors are defined in a class with same signature, then that results in error. The signatures must be different. So that the constructors can be differentiated.
 

Tìm kiếm

Back
Top