Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 84
Q1721:
The correct typecast of pcci in the example is to a _______.
A. char pointer
B. BOOL function pointer
C. FILE pointer
D. DWORD pointer
Correct Answer: B
Chapter: 84
Q1722:
Which keyword is used to handle the calling convention in the cast?
A. __cdecl
B. __stdcall
C. __far
D. __near
Correct Answer: A
Chapter: 84
Q1723:
To explicitly link and call a function, what should be done first?
A. GetProcAddress
B. LoadLibrary
C. Declare DLL
D. LoadExecutable
Correct Answer: B
Chapter: 84
Q1724:
The correct order of operations in explicit linking is:
A. LoadLibrary → GetProcAddress → Cast → Call
B. GetProcAddress → LoadLibrary → Call → Cast
C. Cast → LoadLibrary → Call → GetProcAddress
D. Call → Cast → LoadLibrary → GetProcAddress
Correct Answer: A
Chapter: 84
Q1725:
The string _T("cci_f") represents _______.
A. a DLL name
B. an entry point name
C. an error string
D. a boolean value
Correct Answer: B
Chapter: 84
Q1726:
In the command-line input, which argument specifies the DLL name?
A. argv[0]
B. argv[3]
C. argv[4]
D. argv[5]
Correct Answer: C
Chapter: 84
Q1727:
If fewer than 5 arguments are passed to the program, it shows usage message and _______.
A. exits successfully
B. calls the DLL
C. continue execution
D. reports an error with ReportError
Correct Answer: D
Chapter: 84
Q1728:
The expression `TCHAR YNResp[5] = YES;` is used to _______.
A. store a numeric value
B. store an address
C. store a response
D. store a filename
Correct Answer: C
Chapter: 84
Q1729:
The DLL must contain a function named _______ to be located with GetProcAddress.
A. main
B. cci_f
C. start_function
D. dll_main
Correct Answer: B
Chapter: 84
Q1730:
The value returned by LoadLibrary is stored in a variable of type _______.
A. VOID*
B. HMODULE
C. FARPROC
D. DWORD
Correct Answer: B
Chapter: 84
Q1731:
If the DLL loads successfully, the hDLL variable should be _______.
A. NULL
B. A valid handle
C. Zero
D. Error string
Correct Answer: B
Chapter: 84
Q1732:
If the function pointer is NULL after GetProcAddress, it means _______.
A. Function exists
B. Function not found
C. DLL loaded correctly
D. Parameters are invalid
Correct Answer: B
Chapter: 84
Q1733:
A function pointer must be properly _______ before calling the function in the DLL.
A. terminated
B. loaded
C. typecasted
D. formatted
Correct Answer: C
Chapter: 84
Q1734:
ReportError is used to handle _______.
A. system initialization
B. function results
C. user interaction
D. error cases in DLL loading and function calling
Correct Answer: D
Chapter: 84
Q1735:
Using LoadLibrary and GetProcAddress together is an example of _______.
A. static linking
B. implicit linking
C. explicit linking
D. dynamic loading at compile-time
Correct Answer: C
Chapter: 84
Q1736:
Explicit linking allows you to load and use DLL functions at _______.
A. compile time
B. link time
C. run time
D. preprocessing time
Correct Answer: C
Chapter: 84
Q1737:
The result of GetProcAddress must be typecasted to the correct function pointer before use.
A. A
B. B
Correct Answer: A
Chapter: 84
Q1738:
The pointer 'pcci' must be typecast to a function pointer before calling the DLL function.
A. A
B. B
Correct Answer: A
Chapter: 84
Q1739:
If the DLL or the function is not found, the program terminates using ReportError.
A. A
B. B
Correct Answer: A
Chapter: 84
Q1740:
The entry point function name passed to GetProcAddress must match the name inside the DLL.
A. A
B. B
Correct Answer: A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now