A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. Consider the following C code for process P1 and P2. a=4, b=0, c=0 (initialization)
P1 P2
if (a < 0) b = 10;
c = b-a; a = -3;
c = b+a;
If the processes P1 and P2 executes concurrently (shared variables a, b and c), which of the following cannot be the value of ‘c’ after both processes complete?
a. 4
b. 7
c. 10
d. 13
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: