Change Password
Logout
Update Question
View
Question
<p>Observe following program and answer</p> <div> </div> <div>class Example{</div> <div>public: int a,b,c;</div> <div>Example(){a=b=c=1;} // Constructor 1</div> <div>Example (int a){a=a; b=c=1;}//Constructor 2</div> <div>Example (int a,int b){a=a; b=b; c =1;} //Constructor 3</div> <div>Example (int a, int b, int c){a=a; b=b; c=c;} //Constructor 4</div> <div>In the above example of constructor overloading, the following statements will call which constructor</div> <div>Example obj = new Example(1,2,3);</div>
Option 1
<p>Constructor 2</p>
Option 2
<p>Constructor 4</p>
Option 3
<p>Constructor 1</p>
Option 4
<p>Type mismatch error</p>
Correct Answer
Option 1
Option 2
Option 3
Option 4
Submit
Design and Developed by
O7Solutions