Step 1: Primary functions of commercial banks.
The main functions include accepting deposits, providing loans, and offering agency services.
Step 2: Analyzing the options.
(A) Accept deposits – Correct, banks accept deposits from the public.
(B) Provide loans – Correct, banks lend money to individuals and businesses.
(C) Work as an agent – Correct, banks provide services like payment, transfer, etc.
(D) All of these – Correct, because all listed functions are true.
Step 3: Conclusion.
Thus, the function of commercial banks is all of these.