The fundamental difference between libraries and frameworks is inversion of control (IoC). In a framework, the framework calls your code and dictates the overall flow (D is correct). With a library, your code calls the library functions when needed. Options A and B are incorrect - both can have default behaviors and extensibility varies. Option C is also incorrect - library code can sometimes be modified depending on the license.