Step 1: Consider the diamond problem in C++. A class D inherits from B and C, and both B and C inherit from the same base class A. Without care, D would end up containing two separate copies of A.
Step 2: Two copies cause ambiguity: a reference to an A member from D does not know which copy to use, and it wastes storage.
Step 3: Declaring A as a virtual base class (using virtual inheritance in B and C) tells the compiler to keep just one shared copy of A inside D.
Step 4: This single shared subobject removes the ambiguity and makes member access unambiguous. So the main purpose is to ensure only one copy of the base class exists, which is option (B). The other options describe unrelated features.