Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q3231: The semaphore count is _______ when a waiting thread is released.
  • A: incremented
  • B: decremented
  • C: reset
  • D: ignored
View Answer
B

Q3232: Which of the following functions is used to create a semaphore in Windows API?
  • A: OpenSemaphore()
  • B: ReleaseSemaphore()
  • C: CreateSemaphore()
  • D: WaitSemaphore()
View Answer
C

Q3233: A semaphore is unsignaled when the count is _______.
  • A: greater than 0
  • B: less than 0
  • C: equal to 0
  • D: negative
View Answer
C

Q3234: lpPreviousCount in ReleaseSemaphore() provides the count _______ the release.
  • A: before
  • B: after
  • C: during
  • D: ignored
View Answer
A

Q3235: cReleaseCount in ReleaseSemaphore() must be _______.
  • A: less than 0
  • B: zero
  • C: or greater than 0
  • D: greater than 0
View Answer
D

Q3236: Any thread can release a semaphore, meaning _______.
  • A: only the owner can release
  • B: it has no concept of abandonment
  • C: release is restricted
  • D: to the thread that acquired it
View Answer
B

Q3237: If a semaphore release causes the count to exceed its maximum, the count will _______.
  • A: reset
  • B: remain unchanged
  • C: increment twice
  • D: decrement
View Answer
B

Q3238: Which of the following is NOT a valid semaphore function?
  • A: CreateSemaphoreEx()
  • B: OpenSemaphore()
  • C: WaitSemaphore()
  • D: ReleaseSemaphore()
View Answer
C

Q3239: Semaphore count is a _______ type value that controls the state of the semaphore.
  • A: numeric
  • B: boolean
  • C: string
  • D: object
View Answer
A

Q3240: A NULL return from CreateSemaphore() indicates _______.
  • A: success
  • B: failure
  • C: overflow
  • D: underflow
View Answer
B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now