-->
当前位置:首页 > 题库

单选题:Suppose that a thread is executing “counter=counter+1” while an

Luz5年前 (2021-05-10)题库748
Suppose that a thread is executing “counter=counter+1” while another thread is executing concurrently and independently “counter=counter-1”, where the counter is a variable shared between the two threads. Given that the value of counter is 10 before execution, the possible value(s) after both threads finish their statement are _____ .@[D](1)
A. 9
B. 10
C. 11
D. All of above



A.9
B.10
C.11
D.All of above


答案:D