System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 94
Q2021:
What happens if DUPLICATE_CLOSE_SOURCE is not used?
A. Target handle is invalid
B. Source handle remains open
C. Access is denied
D. Process is suspended
Correct Answer:
B
Chapter: 94
Q2022:
Duplicated handles are only valid in ______.
A. the source process
B. the system registry
C. the target process
D. handle pool
Correct Answer:
C
Chapter: 94
Q2023:
In order to duplicate a handle, the parent process must ______.
A. Have admin rights
B. Have kernel access
C. Use pseudohandle
D. Communicate with target process
Correct Answer:
D
Chapter: 94
Q2024:
The flag DUPLICATE_SAME_ACCESS ensures ______.
A. access rights match source
B. handle is auto-deleted
C. handle is assigned to all threads
D. access is always full
Correct Answer:
A
Chapter: 94
Q2025:
DuplicateHandle() can be used to duplicate ______.
A. files only
B. processes only
C. any handle type
D. threads only
Correct Answer:
C
Chapter: 94
Q2026:
lpTargetHandle is used to ______.
A. write to the handle
B. hold the pointer to the new handle
C. set the handle name
D. allocate process memory
Correct Answer:
B
Chapter: 94
Q2027:
The process duplicating the handle must have ______ rights.
A. PROCESS_TERMINATE
B. PROCESS_CREATE_THREAD
C. PROCESS_DUP_HANDLE
D. PROCESS_VM_READ
Correct Answer:
C
Chapter: 94
Q2028:
The target handle created by DuplicateHandle() is valid in the ______.
A. source process
B. target process
C. all child processes
D. system process
Correct Answer:
B
Chapter: 94
Q2029:
DuplicateHandle() can be used to duplicate socket handles.
A. A
B. B
Correct Answer:
A
Chapter: 94
Q2030:
DuplicateHandle() only works for process handles.
A. A
B. B
Correct Answer:
B
Chapter: 94
Q2031:
The target handle becomes invalid if the target process is terminated.
A. A
B. B
Correct Answer:
A
Chapter: 94
Q2032:
Duplicated handles do not impact reference count.
A. A
B. B
Correct Answer:
B
Chapter: 94
Q2033:
If the source handle is invalid, DuplicateHandle() fails.
A. A
B. B
Correct Answer:
A
Chapter: 94
Q2034:
The function DuplicateHandle() can duplicate handles between unrelated processes.
A. A
B. B
Correct Answer:
A
Chapter: 94
Q2035:
Duplicated handles are independent of original source handles.
A. A
B. B
Correct Answer:
B
Chapter: 94
Q2036:
dwDesiredAccess in DuplicateHandle() is always ignored.
A. A
B. B
Correct Answer:
A
Chapter: 94
Q2037:
DUPLICATE_CLOSE_SOURCE closes the handle in the target process.
A. A
B. B
Correct Answer:
B
Chapter: 94
Q2038:
Handles must be explicitly released even if duplicated.
A. A
B. B
Correct Answer:
A
Chapter: 94
Q2039:
Windows internally tracks handle references using a counter.
A. A
B. B
Correct Answer:
A
Chapter: 94
Q2040:
Duplicating a handle increases its reference count.
A. A
B. B
Correct Answer:
A