class Example{
public: int a,b,c;
Example(){a=b=c=1;} //Constructor 1
Example(int a){a = a; b = c = 1;} //Constructor 2
Example(int a,int b){a = a; b = b; c = 1;} //Constructor 3
Example(int a,int b,int c){ a = a; b = b; c = c;} //Constructor 4
}
In the above example of constructor overloading, the following statement will call which constructor
Example obj = new Example (1,2,3.3);
Options
- Constructor 2
- Constructor 4
- Constrcutor 1
- Type mismatch error
CORRECT ANSWER : Constructor 4
Write your comments