System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2081: Which of the following should not be relied upon after ExitProcess()?
- A: All memory is freed
- B: Resource handles are closed
- C: Termination handlers run
- D: Threads are safe
View Answer
C
Q2082: Which type does ExitProcess() return?
- A: BOOL
- B: VOID
- C: DWORD
- D: LPSTR
View Answer
B
Q2083: Which API is used to close a process from another process context?
- A: CloseHandle()
- B: ExitThread()
- C: TerminateProcess()
- D: SuspendProcess()
View Answer
C
Q2084: Which function is used to wait for a single object in Windows?
- A: WaitForObject()
- B: WaitForAllObjects()
- C: WaitForSingleObject()
- D: WaitProcessObject()
View Answer
C
Q2085: Which function is used to wait for multiple objects in Windows?
- A: WaitGroup()
- B: WaitForMultipleObjects()
- C: WaitArray()
- D: WaitManyHandles()
View Answer
B
Q2086: What type is the first parameter of WaitForSingleObject()?
- A: HANDLE
- B: DWORD
- C: BOOL
- D: CONST HANDLE
View Answer
C
Q2087: In WaitForMultipleObjects(), what does nCount represent?
- A: number of threads
- B: number of events
- C: number of handles
- D: number of processes
View Answer
C
Q2088: In WaitForMultipleObjects(), lpHandles is ______.
- A: a pointer to a structure
- B: a handle to an object
- C: a pointer to an array of handles
- D: a file handle
View Answer
C
Q2089: Which parameter in WaitForMultipleObjects specifies whether to wait for all objects?
- A: nCount
- B: dwMilliseconds
- C: lpHandles
- D: bWaitAll
View Answer
D
Q2090: What does dwMilliseconds = INFINITE indicate in wait functions?
- A: zero wait time
- B: no timeout
- C: indefinite wait
- D: object not found
View Answer
C