Composition vs Inheritance

The GOF book famously advises 'favor object composition over class inheritance.' What is the primary design reason?

A

Composition uses less memory because it avoids storing base class subobjects

B

Composition is always faster at runtime than inheritance due to avoiding vtable lookups

C

Inheritance creates compile-time coupling between base and derived classes, while composition allows behavior to be assembled and changed at runtime

D

Inheritance violates encapsulation because derived classes can access private members of the base class