Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q3361: In the Consume thread, what prevents processing the same message twice?
  • A: Check on fReady flag
  • B: Mutex locking
  • C: Event signaling
  • D: Semaphore wait
View Answer
A

Q3362: Which function is called to release the mutex after message filling?
  • A: ReleaseMutex
  • B: WaitForSingleObject
  • C: SetEvent
  • D: InterlockedIncrement
View Answer
A

Q3363: What does the InterlockedIncrement(&mBlock.nCons) in Consume() do?
  • A: Atomically increments consumed message count
  • B: Signals the producer thread
  • C: Resets fReady
  • D: Decrements lost message count
View Answer
A

Q3364: MessageDisplay uses _tctime_s to:
  • A: Convert timestamp to string
  • B: Generate checksum
  • C: Lock mutex
  • D: Signal event
View Answer
A

Q3365: What type of event is mReady created as?
  • A: Auto-reset
  • B: Manual-reset
  • C: Counting
  • D: Binary
View Answer
A

Q3366: What happens when command 'c' is entered in the consumer thread?
  • A: The next message is consumed
  • B: The consumer thread stops
  • C: The producer thread starts
  • D: A checksum is calculated
View Answer
A

Q3367: What does the WaitForSingleObject function do?
  • A: Waits for a synchronization object to be signaled
  • B: Creates a thread
  • C: Locks a mutex
  • D: Initializes a message buffer
View Answer
A

Q3368: The checksum of the message is calculated using which method?
  • A: Bitwise XOR
  • B: Addition
  • C: Multiplication
  • D: Division
View Answer
A

Q3369: The MSG_BLOCK contains a volatile keyword for which variables?
  • A: mSequence and nCons
  • B: mGuard and mReady
  • C: fReady and fStop
  • D: mData and mChecksum
View Answer
A

Q3370: The function _beginthreadex is used to:
  • A: Create threads
  • B: Create mutexes
  • C: Signal events
  • D: Lock resources
View Answer
A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now