Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q2011: What does lpTargetHandle receive?
  • A: New thread handle
  • B: Copy of source process
  • C: Pointer to the new duplicated handle
  • D: Source file descriptor
View Answer
C

Q2012: If hSourceHandle does not exist in the source process, DuplicateHandle() ______.
  • A: fails
  • B: returns default handle
  • C: returns pseudohandle
  • D: succeeds silently
View Answer
A

Q2013: What access must the duplicating process have to duplicate a handle?
  • A: PROCESS_ALL_ACCESS
  • B: PROCESS_QUERY_INFORMATION
  • C: PROCESS_DUP_HANDLE
  • D: PROCESS_TERMINATE
View Answer
C

Q2014: Which flag ensures the access rights of the duplicated handle match the source?
  • A: DUPLICATE_CLOSE_SOURCE
  • B: DUPLICATE_SAME_ACCESS
  • C: ACCESS_SAME_DUPLICATE
  • D: SAME_ACCESS_ONLY
View Answer
B

Q2015: DUPLICATE_CLOSE_SOURCE is used to ______.
  • A: copy handle with restricted access
  • B: inherit from parent process
  • C: close the source handle after duplication
  • D: terminate the parent process
View Answer
C

Q2016: What is the purpose of dwDesiredAccess in DuplicateHandle()?
  • A: Defines access rights
  • B: Ignored completely
  • C: Checks memory space
  • D: Assigns process ID
View Answer
A

Q2017: What does Windows use to keep track of all handles for a resource?
  • A: Handle counter
  • B: Handle limit
  • C: Reference count
  • D: Access rights tracker
View Answer
C

Q2018: What happens when all references to a resource are closed?
  • A: Resource is locked
  • B: Resource is released
  • C: Resource is inherited
  • D: No effect
View Answer
B

Q2019: Handles that are duplicated or inherited affect the ______.
  • A: system memory
  • B: access permissions
  • C: reference count
  • D: resource path
View Answer
C

Q2020: To duplicate a handle to another process, you must specify ______.
  • A: thread ID
  • B: source process path
  • C: target process handle
  • D: source file name
View Answer
C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now