Quote Originally Posted by abeginner View Post
In (a) - the newly added constructor may be a candidate for constructor call among many overloaded constructors, thus becoming a viable candidate function for some constructor calls.

class A {
A(double) {...} // added ctor - CTOR2
A(int) {...} // CTOR 1
...
}


Now if the library had "A *a = new A(2.3);" Before Ctor2 was added, it resolved to ctor1. After addition of ctor 2 it;d resolve to ctor2.

So, seems like addiing constructor would require recompile of lib. Same for (d), adding default value to a function.

correct?
Your general understanding of the language is correct but the question is tricky.
Your answer (all of the above) would be correct if you make assumption that
any changes done will be reflected on the library classes.

However, you can't infer anything solid from the question except;
1. The modification is done on the author's class, not on the client code
2. The class is [color =red]used[/color], but you have no idea how or when it is used.
thus, the question is asking you
"if you have a Fuji apple, and there are several receipes to make apple pies from it,
when can you not make an apple pie?"
In short, it's asking you to distinguish the realtionship from the object initializiation
from its implementation.
And given the context of this, the best answer would be b (adding a data member).