Question: Which constructor will be called from the object here2 in the below class X ( int a; X() ( a=0; X(int b) { }
Which constructor will be called from the object here2 in the below class X ( int a; X() ( a=0; X(int b) { } a=b+1; } X(int c, int b) { a=b+c; }; x here1(20); x here2 (40,50); X here3; x(int c, int b) X(int c) X(int b) Complie time error.
Step by Step Solution
3.41 Rating (151 Votes )
There are 3 Steps involved in it
In the image we see a class X with three constructors defined 1 A ... View full answer
Get step-by-step solutions from verified subject matter experts
