MCQOPTIONS
Saved Bookmarks
| 1. |
Which constructor will be called from the object obj2 in the following program? class A { int i; A() { i=0; } A(int x) { i=x+1; } A(int y, int x) { i=x+y; } }; A obj1(10); A obj2(10,20); A obj3; |
| A. | A(int x) |
| B. | A(int y) |
| C. | A(int y, int x) |
| D. | A(int y, int x) |
| Answer» D. A(int y, int x) | |