🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Semaphores and Classic Problems: all 9 questions

Quiz: Semaphores and Classic Problems · Question 2 of 9

A semaphore starts at x. After 8 waits and 3 signals its value is 1. What is x?

A semaphore starts at x. After 8 waits and 3 signals its value is 1. What is x?

  1. A.4
  2. B.5
  3. C.6
  4. D.12
Answer & explanation

Correct answer: 6

x − 8 + 3 = 1, so x = 6.

Can you get the rest right without peeking?

Take the timed Quiz: Semaphores and Classic Problems quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →