Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2015 | Question 35
  • Last Updated : 04 Apr, 2018

At a particular time of computation the value of a counting semaphore is 7. Then 20 P operations and 15 V operations were completed on this semaphore. The resulting value of the semaphore is :
(A) 42
(B) 2
(C) 7
(D) 12


Answer: (B)

Explanation: Value of a counting semaphore = 7
After 20 P operations value of semaphore = 7 – 20 = -13
After 15 V operations value of semaphore = -13 + 15 = 2
So, option (B) is correct.

Quiz of this Question
Please comment below if you find anything wrong in the above post

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :