Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q2041: lpTargetHandle in DuplicateHandle() returns a valid handle in the ______.
  • A: parent process
  • B: target process
  • C: source thread
  • D: kernel
View Answer
B

Q2042: The access rights of a duplicated handle can be changed using ______.
  • A: access flag
  • B: option value
  • C: desiredAccess
  • D: dwDesiredAccess
View Answer
D

Q2043: Which DuplicateHandle flag causes automatic closure of the source handle?
  • A: ACCESS_CLOSE
  • B: DUPLICATE_HANDLE_CLOSE
  • C: DUPLICATE_CLOSE_SOURCE
  • D: PROCESS_CLOSE
View Answer
C

Q2044: The function DuplicateHandle requires ______ parameters.
  • A: 4
  • B: 6
  • C: 7
  • D: 5
View Answer
C

Q2045: Which of the following is NOT a parameter in DuplicateHandle()?
  • A: hTargetProcessHandle
  • B: hSourceHandle
  • C: desiredHandle
  • D: lpThreadData
View Answer
D

Q2046: Which function is used to exit a process in Windows?
  • A: TerminateProcess()
  • B: KillProcess()
  • C: ExitThread()
  • D: ExitProcess()
View Answer
D

Q2047: What happens when ExitProcess() is called?
  • A: Process pauses
  • B: Process suspends
  • C: Only one thread ends
  • D: Process and all threads terminate
View Answer
D

Q2048: ExitProcess() does not send control to ______.
  • A: ExitThread()
  • B: Termination handlers
  • C: DllMain()
  • D: OS scheduler
View Answer
B

Q2049: What does ExitProcess() send to DllMain()?
  • A: Error code
  • B: Exception
  • C: handler call
  • D: Detach call
View Answer
D

Q2050: Which parameter is passed to ExitProcess()?
  • A: process name
  • B: thread ID
  • C: exit code
  • D: handle ID
View Answer
C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now