GATE Computer Science (CS) 2015 Shift 1 Solved Paper
© examsiri.com
Question : 30 of 65
Marks:
+1,
-0
The following two functions P1 and P2 that share a variable B with an initial value of 2 execute concurrently.
The number of distinct values that B can possibly take after the execution is __________.
|
P1 ( ) { |
P2 ( ) { |
|
C = B – 1; |
D = 2 * B; |
|
B = 2 * C; |
B = D – 1; |
|
} |
} |
- Your Answer:
Go to Question: