System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2111: The timeout in wait functions is specified in ______.
- A: microseconds
- B: milliseconds
- C: seconds
- D: ticks
View Answer
B
Q2112: If bWaitAll is FALSE, the function returns when ______.
- A: all handles are signaled
- B: any one handle is signaled
- C: timeout expires
- D: process ends
View Answer
B
Q2113: Which Windows function can wait for events, threads, or processes?
- A: GetExitCodeProcess()
- B: TerminateProcess()
- C: WaitForMultipleObjects()
- D: CloseHandle()
View Answer
C
Q2114: Which of the following is NOT a return value of Wait functions?
- A: WAIT_OBJECT_0
- B: WAIT_TIMEOUT
- C: WAIT_FAILED
- D: WAIT_SUCCESS
View Answer
D
Q2115: WAIT_ABANDONED_0 usually applies to ______.
- A: semaphores
- B: files
- C: mutexes
- D: events
View Answer
C
Q2116: Which parameter is used to pass object handles to WaitForMultipleObjects()?
- A: lpEvent
- B: nCount
- C: lpHandles
- D: hObject
View Answer
C
Q2117: How many handles can WaitForMultipleObjects() handle at maximum?
- A: 32
- B: 64
- C: 128
- D: MAXIMUM_WAIT_OBJECTS
View Answer
D
Q2118: Wait functions are useful for synchronizing ______.
- A: files
- B: shared memory
- C: processes
- D: hardware
View Answer
C
Q2119: bWaitAll = TRUE in WaitForMultipleObjects waits for ______.
- A: the last object only
- B: any one object
- C: none of the objects
- D: all objects
View Answer
D
Q2120: WaitForSingleObject() blocks execution until the object becomes ______.
- A: closed
- B: signaled
- C: referenced
- D: unlocked
View Answer
B