edited by
708 views
1 votes
1 votes

Consider the following 2 functions P and Q which share 2 common variables A and B:

P()                                                                      Q()
{                                                                        {
A=A+5;                                                                   A=B+6;
B=A-3;                                                                   B=A-2;
}                                                                        }

If P and Q execute concurrently, the initial value of A=2 and B=3 then the sum of all different values that B can take ____ (do not count B=3)

Why have they taken intermediate values of B like 4..? :/

edited by

Please log in or register to answer this question.

Related questions

2 votes
2 votes
3 answers
1