Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 83
Q1701:
The function GetProcAddress requires the module handle and _______.
A. DLL name
B. entry point name
C. file handle
D. entry ID
Correct Answer: B
Chapter: 83
Q1702:
Explicit linking provides more flexibility than static linking.
A. A
B. B
Correct Answer: A
Chapter: 83
Q1703:
The correct order to call a DLL function using explicit linking is:
A. LoadLibrary → GetProcAddress → Function Call
B. LoadLibrary → Function Call → GetProcAddress
C. GetProcAddress → LoadLibrary → Function Call
D. Function Call → LoadLibrary → GetProcAddress
Correct Answer: A
Chapter: 83
Q1704:
The declaration `HMODULE LoadLibrary(LPCTSTR lpLibFileName);` is used to _______.
A. unload a DLL
B. find function pointer
C. load a DLL
D. assign DLL to pointer
Correct Answer: C
Chapter: 83
Q1705:
HMODULE is used to represent the _______ returned by LoadLibrary.
A. function name
B. DLL name
C. module handle
D. parameter list
Correct Answer: C
Chapter: 83
Q1706:
If LoadLibrary fails, the returned HMODULE is set to _______.
A. INVALID
B. HANDLE
C. VOID
D. NULL
Correct Answer: D
Chapter: 83
Q1707:
What is the role of dwFlags in LoadLibraryEx?
A. Specifies function arguments
B. Controls loading behavior of DLL
C. Returns function pointer
D. Validates DLL signature
Correct Answer: B
Chapter: 83
Q1708:
lpLibFileName in LoadLibraryEx does not require _______.
A. file extension
B. DLL name
C. path validity
D. full path
Correct Answer: A
Chapter: 83
Q1709:
A C type function pointer can be used to _______ in a loaded DLL.
A. save data
B. call an exported function
C. unload it
D. check its memory
Correct Answer: B
Chapter: 83
Q1710:
Explicit linking avoids compile-time dependency on a DLL.
A. A
B. B
Correct Answer: A
Chapter: 83
Q1711:
The primary advantage of explicit linking is _______.
A. higher speed
B. attempted error handling
C. late binding
D. faster execution
Correct Answer: C
Chapter: 83
Q1712:
Using explicit linking, the application will crash if the function name passed to GetProcAddress is invalid.
A. A
B. B
Correct Answer: A
Chapter: 83
Q1713:
The GetProcAddress function will return NULL if _______.
A. hModule is invalid
B. lpProcName is missing
C. the function is not exported
D. all of the above
Correct Answer: D
Chapter: 84
Q1714:
Which Windows API is used to load a DLL for explicit linking?
A. LoadFile
B. LoadFunction
C. LoadLibrary
D. LoadModule
Correct Answer: C
Chapter: 84
Q1715:
In the example, which function is used to obtain the address of 'cci_f' in the DLL?
A. FindFunction
B. LocateProc
C. GetProcAddress
D. GetEntryPoint
Correct Answer: C
Chapter: 84
Q1716:
Which variable in the example is used to store the loaded DLL handle?
A. pcci
B. hDLL
C. YNResp
D. lpFileName
Correct Answer: B
Chapter: 84
Q1717:
What is checked using the condition `if (argc < 5)`?
A. If DLL exists
B. If enough arguments are passed
C. If pointer is valid
D. If encryption is enabled
Correct Answer: B
Chapter: 84
Q1718:
What is the error message shown if the DLL fails to load?
A. Failed calling function
B. Failed loading DLL.
C. Entry point not found
D. Invalid DLL
Correct Answer: B
Chapter: 84
Q1719:
The function pointer ‘pcci’ is assigned the return value of _______.
A. LoadLibrary
B. GetProcAddress
C. argv
D. ReportError
Correct Answer: B
Chapter: 84
Q1720:
If pcci is NULL, what does the program do?
A. Returns to OS
B. Calls ReportError
C. Skips function
D. Unloads DLL
Correct Answer: B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now