OA. free
Free
Accenture Analog Electronics Core Computer Science Medium

Question 17: Using a DLL Routine To use any routine of a DLL, Windows:

Accenture technical mcq question, verified with a worked answer. Free to practise - no sign-up.

Question 17: Using a DLL Routine

To use any routine of a DLL, Windows:

Choose one option.
Show answer & explanation
Answer: B. Loads the library dynamically into memory at runtime

DLLs (Dynamic Link Libraries) are loaded into memory at runtime when needed by an application, not embedded into the executable or recompiled. This approach enables code reuse, reduces executable size, and allows multiple processes to share the same library in memory. Options A and C describe static linking behavior; Option D is incorrect as Windows maintains memory protection for DLLs.

Step-by-step Derivation:
DLL mechanism works as follows: (1) When an application calls a DLL routine, Windows checks if the DLL is already loaded in memory. (2) If not, the OS loads the DLL into memory at that moment (runtime). (3) The application then executes the routine from the loaded library. (4) Multiple applications can reference the same DLL instance in memory, improving efficiency. This is fundamentally different from static linking where code is copied into the executable at compile time.