Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 82
Q1681:
The call to an exported DLL function from another program goes through the _______.
A. .EXE
B. .DEF
C. .LIB
D. .TXT
Correct Answer: C
Chapter: 82
Q1682:
Which of the following ensures consistent naming in exported DLLs?
A. extern “C”
B. STATIC_DEFINE
C. void usage()
D. defined (WINLIB)
Correct Answer: A
Chapter: 82
Q1683:
In a macro structure, LIBSPEC helps manage _______ between modules.
A. function conflicts
B. compiler warnings
C. linking logic
D. import/export declarations
Correct Answer: D
Chapter: 83
Q1684:
What is required in explicit linking to use a function from a DLL?
A. A direct call to the function
B. A declared function in the program
C. A pointer to the function
D. An import statement
Correct Answer: C
Chapter: 83
Q1685:
Which function is used to load a DLL in Windows?
A. LoadFunction
B. GetProcAddress
C. LoadLibrary
D. ImportDLL
Correct Answer: C
Chapter: 83
Q1686:
Which of the following is a variation of LoadLibrary that includes additional parameters?
A. LoadFunction
B. LoadDLL
C. LoadLibraryEx
D. LinkLibrary
Correct Answer: C
Chapter: 83
Q1687:
In explicit linking, what is returned by LoadLibrary on failure?
A. -1
B. nullptr
C. NULL
D. INVALID_HANDLE_VALUE
Correct Answer: C
Chapter: 83
Q1688:
The function pointer is declared in the calling program in explicit linking.
A. A
B. B
Correct Answer: B
Chapter: 83
Q1689:
Explicit linking allows the program to decide at runtime which DLL to load.
A. A
B. B
Correct Answer: A
Chapter: 83
Q1690:
Which Windows API function is used to obtain the address of a function in a DLL?
A. LoadFunction
B. GetProcAddress
C. FindAddress
D. LocateFunction
Correct Answer: B
Chapter: 83
Q1691:
GetProcAddress returns which of the following?
A. HMODULE
B. VOID*
C. FARPROC
D. DWORD
Correct Answer: C
Chapter: 83
Q1692:
In GetProcAddress, what does the parameter 'lpProcName' represent?
A. Module handle
B. Name of the function
C. Function address
D. DLL name
Correct Answer: B
Chapter: 83
Q1693:
The lpProcName in GetProcAddress must be specified as _______.
A. UNICODE
B. string in wide characters
C. ANSI string
D. binary stream
Correct Answer: C
Chapter: 83
Q1694:
The return type of GetProcAddress is _______.
A. HMODULE
B. FARPROC
C. VOID*
D. PROC_ADDR
Correct Answer: B
Chapter: 83
Q1695:
Before calling GetProcAddress, the DLL must be loaded using _______.
A. LoadProc
B. LoadLibrary
C. CallDLL
D. GetFunction
Correct Answer: B
Chapter: 83
Q1696:
A pointer to a function is used instead of a direct function call in _______.
A. Implicit Linking
B. Static Linking
C. Explicit Linking
D. Manual Compilation
Correct Answer: C
Chapter: 83
Q1697:
In explicit linking, is it necessary to specify the extension of the DLL file?
A. Yes
B. No
C. Only for .dll
D. Only in Unicode mode
Correct Answer: B
Chapter: 83
Q1698:
In case of success, LoadLibrary returns _______.
A. NULL
B. HMODULE
C. handle to DLL
D. VOID*
Correct Answer: C
Chapter: 83
Q1699:
FARPROC represents a _______.
A. handle to module
B. address of procedure
C. handle to DLL
D. function return code
Correct Answer: B
Chapter: 83
Q1700:
To dynamically load a DLL and call a function, one must declare a _______ in code.
A. static variable
B. function pointer
C. linked function
D. included module
Correct Answer: B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now