

MCQOPTIONS
Saved Bookmarks
1. |
The following pair of processes share a common variable X :Process Aint Y;A1: Y = X*2;A2: X = Y; Process Bint Z;B1: Z = X+1;B2: X = Z;X is set to 5 before either process begins execution. As usual, statements within a process are executed sequentially, but statements in process A may execute in any order with respect to statements in process B.How many different values of X are possible after both processes finish executing ? |
A. | two |
B. | three |
C. | four |
D. | eight |
Answer» D. eight | |