422 views

2 Answers

Best answer
0 votes
0 votes

B and C is possible .

For b : y=2 ;

x=x+3=3

x=1; (final write )

y=y+x = 2+1 =3

for c :

x = 4, y = 6

this is possible run x=1 after that prrempt it now run code of y=2, x=x+3 here x=1

therefore y=4.now resume from where we prreempt ie statement x=x+y executed x=4+2

giving x=4 and y=6

 

selected by
0 votes
0 votes

x = 4, y = 6 this is possible 

run  x=1 after that prrempt it now run code of

y=2, 

x=x+3

here x=1 therefore y=4.now resume from where we prreempt ie statement x=x+y executed  x=4+2

giving x=4 and y=6


 

Related questions

0 votes
0 votes
1 answer
3
0 votes
0 votes
3 answers
4