Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q2491: When a thread exits, its thread stack is ______.
  • A: deallocated
  • B: shared
  • C: preserved
  • D: reinitialized
View Answer
A

Q2492: When a thread exits and is linked to a DLL, which function is called with DLL_THREAD_DETACH reason?
  • A: DllMain()
  • B: DllAttach()
  • C: DllDetach()
  • D: DllExit()
View Answer
A

Q2493: The ExitThread() function accepts an argument called ______.
  • A: exit code
  • B: thread ID
  • C: priority
  • D: handle
View Answer
A

Q2494: When all threads in a process exit, the process will ______.
  • A: continue
  • B: wait
  • C: terminate
  • D: restart
View Answer
C

Q2495: Which function can be used by one thread to forcibly terminate another thread?
  • A: KillThread()
  • B: TerminateThread()
  • C: StopThread()
  • D: EndThread()
View Answer
B

Q2496: Using TerminateThread() is ______ because it does not deallocate resources or notify DLLs.
  • A: recommended
  • B: discouraged
  • C: required
  • D: optional
View Answer
B

Q2497: After a thread’s execution ends, the thread object exists until ______ is called.
  • A: CloseHandle()
  • B: ExitThread()
  • C: TerminateThread()
  • D: FreeThread()
View Answer
A

Q2498: The function to retrieve a thread’s exit code is ______.
  • A: GetThreadExitCode()
  • B: GetExitCodeThread()
  • C: ExitCodeGet()
  • D: ThreadExitCodeGet()
View Answer
B

Q2499: CloseHandle() is used to destroy the last ______ to a thread object.
  • A: reference
  • B: handle
  • C: stack
  • D: memory
View Answer
B

Q2500: Which function returns a non-inheritable pseudohandle to the calling thread?
  • A: GetThreadId()
  • B: GetCurrentThreadId()
  • C: GetCurrentThread()
  • D: OpenThread()
View Answer
C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now