Inside class Account, an attribute is named __balance. Under which name is it actually stored?
Correct answer D. _Account__balance
Explanation
Names with two leading underscores and at most one trailing underscore are subject to name mangling inside a class body, so __balance becomes _Account__balance. This avoids accidental clashes with names in subclasses. It is not true privacy, since the mangled name can still be accessed.
Answer checked How we write and check questions
Discussion