Question 117

A counting semaphore S is initialised to 3. If 4 wait() and 2 signal() operations are performed, the final value of S is:

  1. A1
  2. B3
  3. C−1
  4. D5
Show answerHide answer

Correct answer: (A) 1

Explanation

3 − 4 + 2 = 1.

From DSSSB TGT Computer Science Full Mock Test 2

This is question 117 of DSSSB TGT Computer Science Full Mock Test 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.