System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 82
Q1661:
Which of the following is **not** part of the default DLL search order?
A. Directory of the application
B. System32 folder
C. Windows directory
D. Registry path
Correct Answer:
D
Chapter: 82
Q1662:
Where must the .DLL file be located during execution?
A. In the same directory as the application
B. In a ZIP file
C. In an archive
D. In a compiler folder
Correct Answer:
A
Chapter: 82
Q1663:
Which macro is used to define whether a DLL is exporting or importing a function?
A. LINKAGE
B. MYLIBRARY_EXPORTS
C. EXTERN_DLL
D. IMPORT_FLAG
Correct Answer:
B
Chapter: 82
Q1664:
To determine the system directory, the function used is _______.
A. GetPath()
B. GetSystemDirectory()
C. SystemLocate()
D. FindSystemPath()
Correct Answer:
B
Chapter: 82
Q1665:
To locate the Windows directory, you can use _______.
A. GetWindowsDirectory()
B. GetWinPath()
C. GetDirectory()
D. FindWinDir()
Correct Answer:
A
Chapter: 82
Q1666:
The PATH environment variable can specify _______ for DLL search.
A. file name
B. library settings
C. compiler options
D. search directories
Correct Answer:
D
Chapter: 82
Q1667:
The default DLL search begins with the _______.
A. system directory
B. DLL cache
C. directory containing the application
D. current working directory
Correct Answer:
C
Chapter: 82
Q1668:
Using `declspec(dllexport)` in C++ makes a function available to _______.
A. local scope
B. internal memory
C. other applications
D. macros
Correct Answer:
C
Chapter: 82
Q1669:
The .DEF file is used to declare functions as _______ from the DLL.
A. local
B. accessible
C. hidden
D. exportable
Correct Answer:
D
Chapter: 82
Q1670:
The LIBSPEC macro is used to manage _______ of functions in DLLs.
A. priority
B. storage scope
C. export/import status
D. execution
Correct Answer:
C
Chapter: 82
Q1671:
The .LIB file is required during the _______ of the calling program.
A. installation
B. building
C. compilation
D. linking
Correct Answer:
D
Chapter: 82
Q1672:
During execution, the DLL must be found by _______ loader
A. DLL
B. manager
C. linker
D. OS
Correct Answer:
B
Chapter: 82
Q1673:
The keyword `LIBSPEC` is defined based on whether _______ is set.
A. MYLIBRARY_EXPORTS
B. STATIC_LINK
C. EXPORTMODE
D. EXTERNAL_USE
Correct Answer:
A
Chapter: 82
Q1674:
Which file contains stub functions for DLL function calls?
A. .DLL
B. .LIB
C. .CPP
D. .DEF
Correct Answer:
B
Chapter: 82
Q1675:
Using extern "C" avoids _______ in exported function names.
A. code optimization
B. syntax checking
C. name mangling
D. function expansion
Correct Answer:
C
Chapter: 82
Q1676:
The GetSystemDirectory() function returns the path of _______.
A. application folder
B. system DLLs
C. system root
D. source directory
Correct Answer:
B
Chapter: 82
Q1677:
The function used to get the path to Windows folder is _______.
A. GetWinDir()
B. FindWindowsPath()
C. GetWindowsDirectory()
D. LocateWinDir()
Correct Answer:
C
Chapter: 82
Q1678:
The PATH environment variable contains paths to _______.
A. compilers
B. shared DLLs
C. header files
D. system directories
Correct Answer:
B
Chapter: 82
Q1679:
DLL functions must be declared as _______ to be usable by external programs.
A. static
B. private
C. exported
D. inline
Correct Answer:
C
Chapter: 82
Q1680:
To enable proper DLL usage, function interfaces should be carefully _______.
A. compiled
B. hidden
C. tested
D. exported
Correct Answer:
D